Home >Backend Development >PHP Tutorial >php的POSIX 函数以及进程测试的深入分析_PHP

php的POSIX 函数以及进程测试的深入分析_PHP

WBOY
WBOYOriginal
2016-06-01 12:07:39833browse

复制代码 代码如下:
echo posix_getpid(); //8805
sleep(10);
?>


再用

#ps -ax


这个时候如果多开开个浏览器请求,就会发现Apache自动增加了几个新的进程


我们发现并非一直请求同一个进程


重启apache
# /usr/local/apache2/bin/apachectl restart
我们发现Apache又恢复到默认进程数。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn