nsenter,unshare: share common code; fix a bug of not closing all fds
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 2 Apr 2016 16:06:24 +0000 (18:06 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 2 Apr 2016 16:06:24 +0000 (18:06 +0200)
commit8220399173cf8d25e37059cadac96ac30f94e82a
treeffe5ae4a783c8ddeceda15f57eae74ee69feebea
parentc87e81f9440278dd46a3eddd1e0f4773afd46a95
nsenter,unshare: share common code; fix a bug of not closing all fds

function                                             old     new   delta
xvfork_parent_waits_and_exits                          -      64     +64
exec_prog_or_SHELL                                     -      39     +39
unshare_main                                         873     810     -63
nsenter_main                                         663     596     -67
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/2 up/down: 106/-130)          Total: -27 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
include/libbb.h
libbb/executable.c
libbb/xfuncs_printf.c
util-linux/nsenter.c
util-linux/unshare.c