Motivation for this addition is that often shells will run processes in a pipeline in parallel, regardless of if they have any input yet. This leads to a lot of messy `ifne` useage that is unneeded with this option. It also allows for greater efficiency in memfd mode as the process passed the /proc fd can be spawned before the copy to stdout (TODO: behaviour of this still undefined.) and the `memfd_create()` fd can be used instead of tweaking stdout to be used. This essentially functions the same way as shell process substitution but with an actually complete file; it waits for all input to be collected *before* spawning the process. This can be useful for interactive programs like gpg, which often are not fond of waiting for input and want it all immediately. Programs that map files into memory can also not like being passed pipe fds, in memfd mode, this shouldn"t be a problem, the fd should be shareable immediately with the correct `ioctl()` call (or perhaps even without.) Fortune for collect's current commit: Small blessing − 小吉exec
parent
14f32d6262
commit
6220233d97
Loading…
Reference in new issue