[Toybox] [PATCH] xargs: open child's stdin non-O_CLOEXEC.

enh enh at google.com
Thu Apr 21 17:58:27 PDT 2022


O_CLOEXEC is the default in toybox, so although the code as written
_looked_ correct, we need to |O_CLOEXEC to have the fd survive the
exec().

Found by folks building the kernel with toybox.
---
 tests/xargs.test   | 2 ++
 toys/posix/xargs.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)/tmp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20220421/e6055099/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-xargs-open-child-s-stdin-non-O_CLOEXEC.patch
Type: text/x-patch
Size: 1256 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20220421/e6055099/attachment-0002.bin>


More information about the Toybox mailing list