Closed maexrakete closed 5 years ago
Duct doesn't currently support process substitution directly, but you could do the same thing the shell does:
nix::unistd::mkfifo
.)echo
processes with duct::Expression::start
writing to the FIFOs. Or really, you could just use a couple of standard Rust background threads. But make sure to use something other than your main thread, because writing to a pipe/FIFO blocks when the write is longer than the pipe buffer, and in this case blocking your main thread would cause a deadlock.gpg
.gpg
exits, await any writer child processes you spawned.If you don't want to touch the filesystem at all, even to lay out FIFOs, then you have a harder problem. I don't know if there's a way to convince GPG to read from any descriptor other than stdin. Or of course you could use combined signatures that include the input file.
Hey!
Thanks for your response. I temporarily use mktemp
currently, but your proposal looks like a better idea!
Thanks for your help, I'll close this issue.
Hey mate,
thanks for this great lib and your hard work. I wanted to now if I could use duct for a process substitution like this:
I basically want to pass a string and a signature to gpg so verify the signature without creating files.