diff options
author | Denys Vlasenko | 2016-04-02 18:06:24 +0200 |
---|---|---|
committer | Denys Vlasenko | 2016-04-02 18:06:24 +0200 |
commit | 8220399173cf8d25e37059cadac96ac30f94e82a (patch) | |
tree | ffe5ae4a783c8ddeceda15f57eae74ee69feebea /include | |
parent | c87e81f9440278dd46a3eddd1e0f4773afd46a95 (diff) | |
download | busybox-8220399173cf8d25e37059cadac96ac30f94e82a.zip busybox-8220399173cf8d25e37059cadac96ac30f94e82a.tar.gz |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h index 5b4280e..64e61cd 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -992,9 +992,10 @@ int BB_EXECVP(const char *file, char *const argv[]) FAST_FUNC; #define BB_EXECVP(prog,cmd) execvp(prog,cmd) #define BB_EXECLP(prog,cmd,...) execlp(prog,cmd,__VA_ARGS__) #endif -int BB_EXECVP_or_die(char **argv) NORETURN FAST_FUNC; +void BB_EXECVP_or_die(char **argv) NORETURN FAST_FUNC; +void exec_prog_or_SHELL(char **argv) NORETURN FAST_FUNC; -/* xvfork() can't be a _function_, return after vfork mangles stack +/* xvfork() can't be a _function_, return after vfork in child mangles stack * in the parent. It must be a macro. */ #define xvfork() \ ({ \ @@ -1006,6 +1007,7 @@ int BB_EXECVP_or_die(char **argv) NORETURN FAST_FUNC; #if BB_MMU pid_t xfork(void) FAST_FUNC; #endif +void xvfork_parent_waits_and_exits(void) FAST_FUNC; /* NOMMU friendy fork+exec: */ pid_t spawn(char **argv) FAST_FUNC; |