summaryrefslogtreecommitdiff
path: root/ext/pcntl/php_signal.c
diff options
context:
space:
mode:
authorJason Greene <jason@php.net>2002-08-22 04:20:10 +0000
committerJason Greene <jason@php.net>2002-08-22 04:20:10 +0000
commit261a60a3604912c70b5176cde5118198ba8a1b70 (patch)
tree323e79ac5229d4615ad78448e2f08887256dacfc /ext/pcntl/php_signal.c
parentfaff3a6e8a5892461486a25db178d1105017e8f5 (diff)
downloadphp-git-261a60a3604912c70b5176cde5118198ba8a1b70.tar.gz
@Made major improvents to the pcntl extension(Jason):
@ - Greatly improved performance, by switching the signal callback mechanism @ to use ticks @ - Implemented object signal callback ability by using array($obj, $method) @ - Added a restart parameter to pcntl_signal, which allows you to disable @ the default of system call restarting Changed callback hash table to be initialized and destroyed per reqeust (allows the ability to use request life zvals as handles) Nuked warnings Modified test script to adjust to new ticks backend Some slight WS fixes
Diffstat (limited to 'ext/pcntl/php_signal.c')
-rw-r--r--ext/pcntl/php_signal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/pcntl/php_signal.c b/ext/pcntl/php_signal.c
index 41172a988b..840eb46b44 100644
--- a/ext/pcntl/php_signal.c
+++ b/ext/pcntl/php_signal.c
@@ -20,16 +20,16 @@
#include "php_signal.h"
-/* php_signal using sigaction is taken verbatim from Advanced Programing
+/* php_signal using sigaction is derrived from Advanced Programing
* in the Unix Environment by W. Richard Stevens p 298. */
-Sigfunc *php_signal(int signo, Sigfunc *func)
+Sigfunc *php_signal(int signo, Sigfunc *func, int restart)
{
struct sigaction act,oact;
act.sa_handler = func;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
- if (signo == SIGALRM) {
+ if (signo == SIGALRM || (! restart)) {
#ifdef SA_INTERRUPT
act.sa_flags |= SA_INTERRUPT; /* SunOS */
#endif