我在pcntl
ubuntu 服务器虚拟机上使用很麻烦。
我有一个 PHP 脚本制作线程来做重复的事情。
我的服务器有 PHP 的 pcntl 扩展。
使用命令php -me
输出:
calendar
ctype
curl
date
dom
filter
hash
iconv
json
libxml
mbstring
mysql
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
posix
Reflection
session
shmop
SimpleXML
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlwriter
zip
zlib
我在代码中添加了日志,所以我确定pcntl_fork
,pcntl_wait
并且pcntl_wexitstatus
由脚本执行。
但在使用线上pcntl_signal_dispatch()
,它因错误而崩溃:
调用未定义函数 pcntl_signal_dispatch()
欢迎任何线索:)