thangappan Posted February 9, 2009 Share Posted February 9, 2009 I am using PHP 5.20.In that I handled signal using pcntl_signal() function.but it is not working.Is there any other way to handle the signal. The code is, <code> function sig_handler($signo){ echo "Signal no $signo is caught\n"; } pcntl_signal(SIGPIPE,"sig_handler"); while(1); I run this program as a background. Then I passed the sigpipe signal explicitly using kill() function. Quote Link to comment Share on other sites More sharing options...
btherl Posted February 9, 2009 Share Posted February 9, 2009 According to the manual for pcntl_signal() you must declare ticks = 1, have you done that? Quote Link to comment Share on other sites More sharing options...
thangappan Posted February 10, 2009 Author Share Posted February 10, 2009 yes now it is working fine,after putting the declare(ticks=1);statement Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.