PHP与Linux进程间的通信

WBOY
Release: 2016-06-23 13:28:08
Original
1322 people have browsed it

进程间通信估计是公司考察应届毕业生的必考点(嵌入式行业),当然很多公司考的是算法。

不查阅资料,我脑子里能想到的
[1] 管道, (有名,无名)
[2] 父子进程
[3] System V (消息队列, 共享内存,信号量)
[4] Socket(本地,网络)
[5] 信号
内核与应用程序
[1] 共享内存
[2] /proc/文件系统

这里说道的php与linux进程间的通信,采用消息队列来实现。

但是问题来了lighttpd权限是lighttpd这个用户的, linux进程的权限是root的, 如果在/tmp目录下建立建立message queue会导致lighttpd发送消息失败。

解决方法:在lighttpd的用户权限的目录下建立消息队列,权限是0666

版权声明:本文为博主原创文章,未经博主允许不得转载。

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!