diff options
author | Rob Landley <rob@landley.net> | 2014-05-21 07:24:16 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-05-21 07:24:16 -0500 |
commit | 1bc522424f6bb21842366ccd11953136436b684b (patch) | |
tree | a65e3b53e4b39c9b7700110d388346beae8c248f /toys.h | |
parent | 9b4158c09cdb766369c45dd2dbc44556d0892694 (diff) | |
download | toybox-1bc522424f6bb21842366ccd11953136436b684b.tar.gz |
Add generic_signal() handler, which sets toys.signal and writes byte to toys.signalfd if set.
Diffstat (limited to 'toys.h')
-rw-r--r-- | toys.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -23,6 +23,7 @@ #include <regex.h> #include <sched.h> #include <setjmp.h> +#include <signal.h> #include <stdarg.h> #include <stddef.h> #include <stdint.h> @@ -125,6 +126,8 @@ extern struct toy_context { int exithelp; // Should error_exit print a usage message first? int old_umask; // Old umask preserved by TOYFLAG_UMASK int toycount; // Total number of commands in this build + int signal; // generic_signal() records what signal it saw here + int signalfd; // and writes signal to this fd, if set // This is at the end so toy_init() doesn't zero it. jmp_buf *rebound; // longjmp here instead of exit when do_rebound set |