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 ITERATIONS   2

Definition at line 16 of file test37.c.

#define MAX_ERROR   4

Definition at line 18 of file test37.c.

#define SIGS   14

Definition at line 17 of file test37.c.

#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  ) 

Definition at line 380 of file test37.c.

void catch14 ( int  signo,
int  code,
struct sigcontext scp 
)

Definition at line 916 of file test37.c.

void catch15 ( int  signo  ) 

Definition at line 961 of file test37.c.

void catch2 ( int  signo  ) 

Definition at line 386 of file test37.c.

void catch3 ( int  signo  ) 

Definition at line 474 of file test37.c.

void catch4 ( int  signo  ) 

Definition at line 512 of file test37.c.

void catch5 ( int  signo  ) 

Definition at line 556 of file test37.c.

void clearsigstate (  ) 

Definition at line 992 of file test37.c.

void e ( int  n  ) 

Definition at line 1044 of file test37.c.

void func1 ( int  sig  ) 

Definition at line 210 of file test37.c.

void func2 ( int  sig  ) 

Definition at line 216 of file test37.c.

int main ( int argc  ,
argv   
)

Definition at line 71 of file test37.c.

void quit ( void   ) 

Definition at line 1004 of file test37.c.

void sigalrm_handler10 ( int  signo  ) 

Definition at line 819 of file test37.c.

void sighup10 ( int  signo  ) 

Definition at line 813 of file test37.c.

void sighup8 ( int  signo  ) 

Definition at line 678 of file test37.c.

void sighup9 ( int  signo  ) 

Definition at line 754 of file test37.c.

void sigint_handler ( int  signo  ) 

Definition at line 608 of file test37.c.

void sigpip8 ( int  signo  ) 

Definition at line 685 of file test37.c.

void sigpipe_handler ( int  signo  ) 

Definition at line 615 of file test37.c.

void sigter8 ( int  signo  ) 

Definition at line 692 of file test37.c.

void sigter9 ( int  signo  ) 

Definition at line 760 of file test37.c.

void test37a (  ) 

Definition at line 112 of file test37.c.

void test37b (  ) 

Definition at line 222 of file test37.c.

void test37c (  ) 

Definition at line 396 of file test37.c.

void test37d (  ) 

Definition at line 487 of file test37.c.

void test37e (  ) 

Definition at line 527 of file test37.c.

void test37f (  ) 

Definition at line 562 of file test37.c.

void test37g (  ) 

Definition at line 622 of file test37.c.

void test37h (  ) 

Definition at line 699 of file test37.c.

void test37i (  ) 

Definition at line 766 of file test37.c.

void test37j (  ) 

Definition at line 825 of file test37.c.

void test37k (  ) 

Definition at line 863 of file test37.c.

void test37l (  ) 

Definition at line 867 of file test37.c.

void test37n (  ) 

Definition at line 933 of file test37.c.

void test37o (  ) 

Definition at line 970 of file test37.c.

TEST_SETJMP ( test37m  ,
13  ,
jmp_buf  ,
setjmp(jb)  ,
longjmp(jb, 1)  ,
 
)

Definition at line 900 of file test37.c.

void wait_for ( pid_t  pid  ) 

Definition at line 1019 of file test37.c.


Variable Documentation

int cumsig

Definition at line 20 of file test37.c.

int errct = 0

Definition at line 20 of file test37.c.

Definition at line 959 of file test37.c.

sigset_t glo_vol_set

Definition at line 378 of file test37.c.

int iteration

Definition at line 20 of file test37.c.

int sig1

Definition at line 20 of file test37.c.

int sig2

Definition at line 20 of file test37.c.

int sigarray[SIGS]

Initial value:

Definition at line 22 of file test37.c.

int subtest

Definition at line 20 of file test37.c.

int x

Definition at line 377 of file test37.c.


Generated on Tue Mar 9 04:37:05 2010 for Minix by  doxygen 1.5.8