These are chat archives for rust-lang/rust
echo cat <(cat foo)you'll see something like
cat /dev/fd/234so there's your file descriptor. Yes, I understand that there are handles but since
cat <(cat foo)does work under mingw or whatever I already have I am assuming that handle is made available for the outer cat process to handle somehow
DuplicateHandlefrom the parent process? thanks for checking how it looks with a native app
23860is not the process ID of the native windows program itself, nor is it the process ID of bash
DuplicateHandlewould work since you can specify the source process to be that bash process
DuplicateHandlethere is a special
PROCESS_DUP_HANDLEaccess right requirement ... I guess I'll have to try and see. And figure out how to develop under windows..
OpenProcessto get a handle to the process with the given ID, you just have to specify
PROCESS_DUP_HANDLEin the access rights
bashconsuming the output of
<(cat foo)will probably start my process with the
PROCESS_DUP_HANDLEright so that the handle will be accessible
PROCESS_DUP_HANDLEright while doing so
ls /proc/$pidin linux ... with the benefit of getting that access right.
#[cfg(test)] mod reverse_string_test;in your
reverse_string.rs, which will bring the module in from the other file. The other (more common) is to put the bigger/integration tests into a separate folter
tests(under the top level directory). These all are automagically considered tests by cargo.
How do i get both path value and call persist method on to the same object.
let tfile = NamedTempFileOptions::new() .prefix("tess_") .suffix(&suf[..]) .rand_bytes(6) .create(); let namedfile : NamedTempFile = tfile.unwrap(); let path: &Path = namedfile.path(); let fp = namedfile.persist(&env::temp_dir()); //ERROR <- namedfile value used here after move
Any solutions ???
to_ownedafter the call to path
namedfile, then attempting to move from
persist, which invalidates the borrowed data