Back to index

php5  5.3.10
Defines | Typedefs | Functions
php_signal.h File Reference
#include <signal.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define NSIG   32
#define SIGRTMAX   64

Typedefs

typedef void Sigfunc (int)

Functions

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

Define Documentation

#define NSIG   32

Definition at line 26 of file php_signal.h.

#define SIGRTMAX   64

Definition at line 29 of file php_signal.h.


Typedef Documentation

typedef void Sigfunc(int)

Definition at line 32 of file php_signal.h.


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: