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. Link to comment https://forums.phpfreaks.com/topic/144442-signal-handing/ 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? Link to comment https://forums.phpfreaks.com/topic/144442-signal-handing/#findComment-758018 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 Link to comment https://forums.phpfreaks.com/topic/144442-signal-handing/#findComment-758619 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.