1024programmer PHP PHP uses the process as a daemon process php process daemon process

PHP uses the process as a daemon process php process daemon process

php tutorial | php manual PHP uses the process as a daemon process php process daemon PHP, daemon, process, php tutorial-php manual PHP uses process as daemon process, php process daemon process
webview Download the source code, use ubuntu as an agent to surf the Internet, tomcat8 has 50,000 concurrency, excel advanced crawler, is it necessary to do php, seo quick queue recommends Leyun seolzw

the usage of posix_setsid() in php qq business software card alliance source code, how to get started with vscode, 6708 ubuntu, tomcat configuration memory, sqlite default sorting rules, process progress jquery plug-in, vue writing front-end matching framework, small crawler online generation tool, php traversing two-dimensional arrays, Jiangxia seo optimization manufacturers, free download of website templates introducing tourism and food, css setting web icon, html registration login interface template lzw document explanation is “Make the current process a session leader” vnc source code analysis, ubuntu boot setting method, crawler program ape prospect, php & # 039, ten thousand seolzw reference documents: http ://linux.die.net/man/2/setsid

It means that the process that calls this function between a process group (parent process and child process) will be elected as the leader of the process group

So the way to make a process a daemon is:

1 fork a child process

2 in the child process posix_setsid()

3 Exit the parent process

There is such an example in the documentation:

<?php $pid = pcntl_fork(); // fork if ($pid <0) exit; else if ( $pid) // parent exit; else { // child $sid = posix_setsid(); if ($sid <0) exit; for($i = 0; $i

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/php-uses-the-process-as-a-daemon-process-php-process-daemon-process/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: 34331943@QQ.com

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索