From 1bc522424f6bb21842366ccd11953136436b684b Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 21 May 2014 07:24:16 -0500 Subject: Add generic_signal() handler, which sets toys.signal and writes byte to toys.signalfd if set. --- toys.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'toys.h') diff --git a/toys.h b/toys.h index c59c3c51..6666cfbf 100644 --- a/toys.h +++ b/toys.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -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 -- cgit v1.2.3