]> Sergey Matveev's repositories - public-inbox.git/commit
lei: support /dev/fd/[0-2] inputs and outputs in daemon
authorEric Wong <e@80x24.org>
Fri, 26 Mar 2021 09:51:25 +0000 (09:51 +0000)
committerEric Wong <e@80x24.org>
Fri, 26 Mar 2021 23:08:18 +0000 (23:08 +0000)
commit65ec1f78464ce8cf4f6379aca7bbae38743c50f0
tree0eb594c491282fdec01b7aafc39a45485a39c287
parentd69102cfff67e4308c560c5e8daa8f8a486ff24d
lei: support /dev/fd/[0-2] inputs and outputs in daemon

Since lei-daemon won't have the same FDs as the client, we
need to special-case thse mappings and won't be able to open
arbitrary, non-standard FDs.

We also won't attempt to support /proc/self/fd/[0-2] since
that's a Linux-ism.  /dev/fd/[0-2] and /dev/std{in,out,err}
are portable to FreeBSD, at least.  mawk(1) also supports
/dev/std{out,err}, as does gawk(1) (which supports everything
we can support, and arbitrary /dev/fd/$FD).
lib/PublicInbox/LEI.pm
lib/PublicInbox/LeiConvert.pm
lib/PublicInbox/LeiInput.pm
lib/PublicInbox/LeiOverview.pm
lib/PublicInbox/LeiP2q.pm
lib/PublicInbox/LeiToMail.pm
t/lei-convert.t
t/lei-import.t