From 62319d069e19bcc45f06feb11d38d11dd42c6944 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 18 Mar 2008 17:33:03 +0000 Subject: [PATCH] Commented out real-time signal related stuff (SA_SIGINFO, waitid()) to prevent "configure" scripts from thinking we do actually support it. Having real-time signals would be nice though (cf. #1935). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24444 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/posix/signal.h | 8 ++++++-- headers/posix/sys/wait.h | 6 +++++- src/system/libroot/posix/sys/wait.c | 15 ++++++++------- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/headers/posix/signal.h b/headers/posix/signal.h index 4bb3d3ccaf..aa04e4a256 100644 --- a/headers/posix/signal.h +++ b/headers/posix/signal.h @@ -25,7 +25,10 @@ typedef void (*__signal_func_ptr)(int); #define SIG_ERR ((sighandler_t)-1) /* an error occurred during signal processing */ #define SIG_HOLD ((sighandler_t)3) /* the signal was hold */ -// TODO: support this structure! +// TODO: Support this structure, or more precisely the SA_SIGINFO flag. To do +// this properly we need real-time signal support. Both are commented out for +// the time being to not make "configure" scripts think we do support them. +#if 0 typedef struct { int si_signo; /* signal number */ int si_code; /* signal code */ @@ -36,6 +39,7 @@ typedef struct { int si_status; /* exit value or signal */ long si_band; /* band event for SIGPOLL */ } siginfo_t; +#endif /* 0 */ /* * structure used by sigaction() @@ -57,7 +61,7 @@ struct sigaction { #define SA_NODEFER 0x08 #define SA_RESTART 0x10 #define SA_ONSTACK 0x20 -#define SA_SIGINFO 0x40 +//#define SA_SIGINFO 0x40 #define SA_NOMASK SA_NODEFER #define SA_STACK SA_ONSTACK #define SA_ONESHOT SA_RESETHAND diff --git a/headers/posix/sys/wait.h b/headers/posix/sys/wait.h index 80685bfb5b..876bf0bddb 100644 --- a/headers/posix/sys/wait.h +++ b/headers/posix/sys/wait.h @@ -27,12 +27,16 @@ #define WIFCORED(value) ((value) & 0x10000) #define WIFCONTINUED(value) ((value) & 0x20000) +// TODO: waitid() is part of the real-time signal extension. Uncomment when +// implemented! +#if 0 /* ID types for waitid() */ typedef enum { P_ALL, /* wait for any children, ignore ID */ P_PID, /* wait for the child whose process ID matches */ P_PGID /* wait for any child whose process group ID matches */ } idtype_t; +#endif // 0 #ifdef __cplusplus @@ -41,7 +45,7 @@ extern "C" { extern pid_t wait(int *_status); extern pid_t waitpid(pid_t pid, int *_status, int options); -extern int waitid(idtype_t idType, id_t id, siginfo_t *info, int options); +//extern int waitid(idtype_t idType, id_t id, siginfo_t *info, int options); #ifdef __cplusplus } diff --git a/src/system/libroot/posix/sys/wait.c b/src/system/libroot/posix/sys/wait.c index 3aa15d6349..cc478cc79f 100644 --- a/src/system/libroot/posix/sys/wait.c +++ b/src/system/libroot/posix/sys/wait.c @@ -71,11 +71,12 @@ waitpid(pid_t pid, int *_status, int options) } -int -waitid(idtype_t idType, id_t id, siginfo_t *info, int options) -{ - // waitid() is not available on BeOS so we may be lazy here and remove it... - fprintf(stderr, "waitid(): NOT IMPLEMENTED\n"); - return -1; -} +// TODO: Implement as part of real-time signal support! +//int +//waitid(idtype_t idType, id_t id, siginfo_t *info, int options) +//{ +// // waitid() is not available on BeOS so we may be lazy here and remove it... +// fprintf(stderr, "waitid(): NOT IMPLEMENTED\n"); +// return -1; +//}