diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-04-28 16:43:18 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-04-28 16:43:18 +0000 |
commit | 18e19f2b0d36c0d9566d871942dfe282e9cf5a28 (patch) | |
tree | 22d3da65f1031bac1833c4f53c24b4f7876d5d6b /include | |
parent | a6a1785a30d6fe011eeabec3c19e154dc475b1b0 (diff) | |
download | busybox-18e19f2b0d36c0d9566d871942dfe282e9cf5a28.tar.gz |
hush: fix nofork + ctrl-Z clobbering of globals
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h index fce10f310..9950c61f2 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -509,10 +509,20 @@ int wait_nohang(int *wstat); #define wait_exitcode(w) ((w) >> 8) #define wait_stopsig(w) ((w) >> 8) #define wait_stopped(w) (((w) & 127) == 127) -/* Does NOT check that applet is NOFORK, just blindly runs it */ -int run_nofork_applet(const struct bb_applet *a, char **argv); /* wait4pid(spawn(argv)) + NOFORK/NOEXEC (if configured) */ int spawn_and_wait(char **argv); +struct nofork_save_area { + const struct bb_applet *current_applet; + int xfunc_error_retval; + uint32_t option_mask32; + int die_sleep; + smallint saved; +}; +void save_nofork_data(struct nofork_save_area *save); +void restore_nofork_data(struct nofork_save_area *save); +/* Does NOT check that applet is NOFORK, just blindly runs it */ +int run_nofork_applet(const struct bb_applet *a, char **argv); +int run_nofork_applet_prime(struct nofork_save_area *old, const struct bb_applet *a, char **argv); /* Helpers for daemonization. * |