Back to index

php5  5.3.10
Functions
php_signal.c File Reference
#include "php_signal.h"

Go to the source code of this file.

Functions

Sigfuncphp_signal4 (int signo, Sigfunc *func, int restart, int mask_all)
Sigfuncphp_signal (int signo, Sigfunc *func, int restart)

Function Documentation

Sigfunc* php_signal ( int  signo,
Sigfunc func,
int  restart 
)

Definition at line 50 of file php_signal.c.

{
       return php_signal4(signo, func, restart, 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Sigfunc* php_signal4 ( int  signo,
Sigfunc func,
int  restart,
int  mask_all 
)

Definition at line 25 of file php_signal.c.

{
       struct sigaction act,oact;
       act.sa_handler = func;
       if (mask_all) {
              sigfillset(&act.sa_mask);
       } else {
              sigemptyset(&act.sa_mask);
       }
       act.sa_flags = 0;
       if (signo == SIGALRM || (! restart)) {
#ifdef SA_INTERRUPT
              act.sa_flags |= SA_INTERRUPT; /* SunOS */
#endif
       } else {
#ifdef SA_RESTART
              act.sa_flags |= SA_RESTART; /* SVR4, 4.3+BSD */
#endif
       }
       if (sigaction(signo, &act, &oact) < 0)
              return SIG_ERR;
 
       return oact.sa_handler;
}

Here is the caller graph for this function: