diff --git a/headers/posix/signal.h b/headers/posix/signal.h index e4a4a03d90..a456af39a9 100644 --- a/headers/posix/signal.h +++ b/headers/posix/signal.h @@ -1,20 +1,33 @@ #ifndef _SIGNAL_H_ #define _SIGNAL_H_ - /* ** Distributed under the terms of the OpenBeOS License. */ + #include -typedef int sig_atomic_t; +typedef int sig_atomic_t; typedef long sigset_t; typedef void (*sig_func_t)(int); typedef void (*__signal_func_ptr)(int); /* deprecated, for compatibility with BeOS only */ +// ToDo: actually make use of this structure! +typedef struct { + int si_signo; /* signal number */ + int si_code; /* signal code */ + int si_errno; /* if non zero, an error number associated with this signal */ + pid_t si_pid; /* sending process ID */ + uid_t si_uid; /* real user ID of sending process */ + void *si_addr; /* address of faulting instruction */ + int si_status; /* exit value or signal */ + long si_band; /* band event for SIGPOLL */ +} siginfo_t; + + /* * macros defining the standard signal handling behavior */ @@ -31,10 +44,10 @@ typedef void (*__signal_func_ptr)(int); /* deprecated, for compatibility with B * */ struct sigaction { - sig_func_t sa_handler; - sigset_t sa_mask; - int sa_flags; - void *sa_userdata; /* will be passed to the signal handler */ + sig_func_t sa_handler; + sigset_t sa_mask; + int sa_flags; + void *sa_userdata; /* will be passed to the signal handler */ }; @@ -49,14 +62,13 @@ struct sigaction { #define SA_STACK 0x10 - /* * for signals using an alternate stack */ typedef struct stack_t { - void *ss_sp; - size_t ss_size; - int ss_flags; + void *ss_sp; + size_t ss_size; + int ss_flags; } stack_t; @@ -68,7 +80,6 @@ typedef struct stack_t { #define SIG_SETMASK 3 - /* * The list of all defined signals: * @@ -112,12 +123,10 @@ typedef struct stack_t { #define NSIG (__signal_max+1) /* the number of defined signals */ - /* the global table of text strings containing descriptions for each signal */ extern const char * const sys_siglist[NSIG]; - #ifdef __cplusplus extern "C" { #endif @@ -168,7 +177,6 @@ sigdelset(sigset_t *set, int sig) } #endif - /* * ================================================== * !!! SPECIAL NOTES CONCERNING NON-POSIX EXTENSIONS: @@ -234,9 +242,6 @@ sigdelset(sigset_t *set, int sig) * open some interesting programming possibilities. */ - - - /* * the vregs struct: * @@ -400,5 +405,4 @@ struct vregs { #endif /* __INTEL__ */ - #endif /* _SIGNAL_H_ */