开发者

pcntl_signal(): Error assigning signal

开发者 https://www.devze.com 2022-12-29 21:54 出处:网络
Why happend this error: Warning: pcntl_signal(): Error assigning signal i开发者_如何学Gon ... In php5 in CLI, the line is:

Why happend this error:

Warning: pcntl_signal(): Error assigning signal i开发者_如何学Gon ...

In php5 in CLI, the line is:

pcntl_signal(9,"signalHandlerTemp", false);

I try with SIGKILL and true and nothing!


I quote (from the PHP.net comments): rbotzer at yahoo dot com 22-Jun-2008 06:50 You cannot assign a signal handler for SIGKILL (kill -9) http://php.net/manual/en/function.pcntl-signal.php

And this seems to be correct, try changing 9 into 'SIGHUP' and try again, your code will now run...


add this code before sig_handler()

declare(ticks = 1);

..and try again

0

精彩评论

暂无评论...
验证码 换一张
取 消