summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenys Vlasenko2016-04-02 18:06:24 +0200
committerDenys Vlasenko2016-04-02 18:06:24 +0200
commit8220399173cf8d25e37059cadac96ac30f94e82a (patch)
treeffe5ae4a783c8ddeceda15f57eae74ee69feebea /include
parentc87e81f9440278dd46a3eddd1e0f4773afd46a95 (diff)
downloadbusybox-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.h6
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;