开发者

pcntl_signal(): Error assigning signal

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜