src/test/test37.c File Reference
#include <sys/types.h>
#include <sys/times.h>
#include <sys/wait.h>
#include <errno.h>
#include <signal.h>
#include <setjmp.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
Go to the source code of this file.
|
Defines |
| #define | ITERATIONS 2 |
| #define | SIGS 14 |
| #define | MAX_ERROR 4 |
| #define | TEST_SETJMP(_name, _subtest, _type, _setjmp, _longjmp, _save) |
Functions |
| | _PROTOTYPE (int main,(int argc, char *argv[])) |
| | _PROTOTYPE (void test37a,(void)) |
| | _PROTOTYPE (void func1,(int sig)) |
| | _PROTOTYPE (void catch1,(int signo)) |
| | _PROTOTYPE (void catch14,(int signo, int code, struct sigcontext *scp)) |
| | _PROTOTYPE (void wait_for,(int pid)) |
| | _PROTOTYPE (void e,(int n)) |
| int | main (int argc, argv) |
| void | test37a () |
| void | func1 (int sig) |
| void | func2 (int sig) |
| void | test37b () |
| void | catch1 (int signo) |
| void | catch2 (int signo) |
| void | test37c () |
| void | catch3 (int signo) |
| void | test37d () |
| void | catch4 (int signo) |
| void | test37e () |
| void | catch5 (int signo) |
| void | test37f () |
| void | sigint_handler (int signo) |
| void | sigpipe_handler (int signo) |
| void | test37g () |
| void | sighup8 (int signo) |
| void | sigpip8 (int signo) |
| void | sigter8 (int signo) |
| void | test37h () |
| void | sighup9 (int signo) |
| void | sigter9 (int signo) |
| void | test37i () |
| void | sighup10 (int signo) |
| void | sigalrm_handler10 (int signo) |
| void | test37j () |
| void | test37k () |
| void | test37l () |
| | TEST_SETJMP (test37m, 13, jmp_buf, setjmp(jb), longjmp(jb, 1), 1) |
| void | catch14 (int signo, int code, struct sigcontext *scp) |
| void | test37n () |
| void | catch15 (int signo) |
| void | test37o () |
| void | clearsigstate () |
| void | quit () |
| void | wait_for (pid_t pid) |
| void | e (int n) |
Variables |
| int | iteration |
| int | cumsig |
| int | subtest |
| int | errct = 0 |
| int | sig1 |
| int | sig2 |
| int | sigarray [SIGS] |
| int | x |
| sigset_t | glo_vol_set |
| jmp_buf | glo_jb |
Define Documentation
| #define TEST_SETJMP |
( |
_name, |
|
|
_subtest, |
|
|
_type, |
|
|
_setjmp, |
|
|
_longjmp, |
|
|
_save |
|
) |
|
Value:
void _name(void) \
{ \
_type jb; \
sigset_t ss, ssexp; \
\
subtest = _subtest; \
clearsigstate(); \
\
ss = 0x32; \
if (sigprocmask(SIG_SETMASK, &ss, (sigset_t *)NULL) == -1) e(1); \
if (_setjmp) { \
if (sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &ss) == -1) e(2); \
ssexp = _save ? 0x32 : 0x3abc; \
if ((ss ^ ssexp) & ~(1 << SIGKILL)) e(388); \
return; \
} \
ss = 0x3abc; \
if (sigprocmask(SIG_SETMASK, &ss, (sigset_t *)NULL) == -1) e(4); \
_longjmp; \
}
Definition at line 878 of file test37.c.
Function Documentation
| _PROTOTYPE |
( |
void |
e, |
|
|
(int n) |
| |
|
) |
| | |
| _PROTOTYPE |
( |
void |
wait_for, |
|
|
(int pid) |
| |
|
) |
| | |
| _PROTOTYPE |
( |
void |
catch14, |
|
|
(int signo, int code, struct sigcontext *scp) |
| |
|
) |
| | |
| _PROTOTYPE |
( |
void |
catch1, |
|
|
(int signo) |
| |
|
) |
| | |
| _PROTOTYPE |
( |
void |
func1, |
|
|
(int sig) |
| |
|
) |
| | |
| _PROTOTYPE |
( |
void |
test37a, |
|
|
(void) |
| |
|
) |
| | |
| _PROTOTYPE |
( |
int |
main, |
|
|
(int argc, char *argv[]) |
| |
|
) |
| | |
| void catch1 |
( |
int |
signo |
) |
|
| void catch14 |
( |
int |
signo, |
|
|
int |
code, |
|
|
struct sigcontext * |
scp | |
|
) |
| | |
| void catch15 |
( |
int |
signo |
) |
|
| void catch2 |
( |
int |
signo |
) |
|
| void catch3 |
( |
int |
signo |
) |
|
| void catch4 |
( |
int |
signo |
) |
|
| void catch5 |
( |
int |
signo |
) |
|
| int main |
( |
int argc |
, |
|
|
argv |
| |
|
) |
| | |
| void sigalrm_handler10 |
( |
int |
signo |
) |
|
| void sighup10 |
( |
int |
signo |
) |
|
| void sighup8 |
( |
int |
signo |
) |
|
| void sighup9 |
( |
int |
signo |
) |
|
| void sigint_handler |
( |
int |
signo |
) |
|
| void sigpip8 |
( |
int |
signo |
) |
|
| void sigpipe_handler |
( |
int |
signo |
) |
|
| void sigter8 |
( |
int |
signo |
) |
|
| void sigter9 |
( |
int |
signo |
) |
|
| TEST_SETJMP |
( |
test37m |
, |
|
|
13 |
, |
|
|
jmp_buf |
, |
|
|
setjmp(jb) |
, |
|
|
longjmp(jb, 1) |
, |
|
|
1 |
| |
|
) |
| | |
| void wait_for |
( |
pid_t |
pid |
) |
|
Variable Documentation
Initial value:
{SIGHUP, SIGILL, SIGTRAP, SIGABRT, SIGIOT,
SIGFPE, SIGUSR1, SIGSEGV, SIGUSR2, SIGPIPE, SIGALRM,
SIGTERM}
Definition at line 22 of file test37.c.