Jump to content

Signal handing


thangappan

Recommended Posts

 

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.