ID: 17558 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: No Feedback Bug Type: *Extensibility Functions Operating System: Mac OS X PHP Version: 4.2.1 New Comment:
I've been seeing the same thing, but on OpenBSD 3.1-stable. I can't test with 4.3.0-cvs as it's currently broken for me (bug 20063), but my last build that worked (from about 5 days ago) has this same problem - I set up signal handlers, send it signals and nothing happens. Previous Comments: ------------------------------------------------------------------------ [2002-09-09 01:00:04] [EMAIL PROTECTED] No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2002-08-08 00:51:03] [EMAIL PROTECTED] is pnctl built into php, or as a module - pcntl.so ? ------------------------------------------------------------------------ [2002-08-07 02:22:32] [EMAIL PROTECTED] See bug id 15125. Looks like a similar problem. ------------------------------------------------------------------------ [2002-07-07 21:00:30] [EMAIL PROTECTED] Does this happen with the latest snapshot: http://snaps.php.net/php4-latest.tar.gz ------------------------------------------------------------------------ [2002-06-01 23:27:52] [EMAIL PROTECTED] function: pcntl_signal() problem: If "handler" argument is set to a user-defined function, that function is never called. script: (taken from www.php.net/pcntl_signal) <?php // signal handler function function sig_handler($signo) { echo "We hit the sig_handler!\n"; switch($signo) { case SIGTERM: // handle shutdown tasks exit; break; case SIGHUP: // handle restart tasks break; case 1: print "Caught sig 1 ...\n"; break; case SIGUSR1: print "Caught SIGUSR1...\n"; break; default: // handle all other signals } } print "Installing signal handler...\n"; // setup signal handlers pcntl_signal(SIGTERM, "sig_handler"); pcntl_signal(SIGHUP, "sig_handler"); pcntl_signal(SIGUSR1, "sig_handler"); print "Generating signal SIGTERM to self...\n"; // send SIGUSR1 to current process id posix_kill(posix_getpid(), SIGUSR1); print "Done\n" ?> The "we hit the sig handler!" echo never appears ... thus I suspect it's never being called. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17558&edit=1