diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-04-28 16:43:18 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-04-28 16:43:18 +0000 |
commit | 55d9577d37fa4c82c52a30d14542a116da40cca2 (patch) | |
tree | 22d3da65f1031bac1833c4f53c24b4f7876d5d6b /include | |
parent | 0ad132c07285ca3448428a07d448be975526a47e (diff) | |
download | busybox-w32-55d9577d37fa4c82c52a30d14542a116da40cca2.tar.gz busybox-w32-55d9577d37fa4c82c52a30d14542a116da40cca2.tar.bz2 busybox-w32-55d9577d37fa4c82c52a30d14542a116da40cca2.zip |
hush: fix nofork + ctrl-Z clobbering of globals
git-svn-id: svn://busybox.net/trunk/busybox@18521 69ca8d6d-28ef-0310-b511-8ec308f3f277
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); | |||
509 | #define wait_exitcode(w) ((w) >> 8) | 509 | #define wait_exitcode(w) ((w) >> 8) |
510 | #define wait_stopsig(w) ((w) >> 8) | 510 | #define wait_stopsig(w) ((w) >> 8) |
511 | #define wait_stopped(w) (((w) & 127) == 127) | 511 | #define wait_stopped(w) (((w) & 127) == 127) |
512 | /* Does NOT check that applet is NOFORK, just blindly runs it */ | ||
513 | int run_nofork_applet(const struct bb_applet *a, char **argv); | ||
514 | /* wait4pid(spawn(argv)) + NOFORK/NOEXEC (if configured) */ | 512 | /* wait4pid(spawn(argv)) + NOFORK/NOEXEC (if configured) */ |
515 | int spawn_and_wait(char **argv); | 513 | int spawn_and_wait(char **argv); |
514 | struct nofork_save_area { | ||
515 | const struct bb_applet *current_applet; | ||
516 | int xfunc_error_retval; | ||
517 | uint32_t option_mask32; | ||
518 | int die_sleep; | ||
519 | smallint saved; | ||
520 | }; | ||
521 | void save_nofork_data(struct nofork_save_area *save); | ||
522 | void restore_nofork_data(struct nofork_save_area *save); | ||
523 | /* Does NOT check that applet is NOFORK, just blindly runs it */ | ||
524 | int run_nofork_applet(const struct bb_applet *a, char **argv); | ||
525 | int run_nofork_applet_prime(struct nofork_save_area *old, const struct bb_applet *a, char **argv); | ||
516 | 526 | ||
517 | /* Helpers for daemonization. | 527 | /* Helpers for daemonization. |
518 | * | 528 | * |