允许后台执行进程exec("binary > /dev/null &") 怎么操作啊
时间:2011-11-07
来源:互联网
求助 安装一个PHP程序,CENTOS5系统 程序要求服务器 允许后台执行进程exec("binary > /dev/null &") ,不知道要怎么操作呢,服务器是自己管理的,本人刚接触LINUX不太懂,求高手指点,3Q
作者: nmxkxp 发布时间: 2011-11-07
C/C++ code
NAME daemon - run in the background SYNOPSIS #include <unistd.h> int daemon(int nochdir, int noclose); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): daemon(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) DESCRIPTION The daemon() function is for programs wishing to detach themselves from the controlling terminal and run in the background as system daemons. If nochdir is zero, daemon() changes the calling process's current working directory to the root directory ("/"); otherwise, the current working directory is left unchanged. If noclose is zero, daemon() redirects standard input, standard output and standard error to /dev/null; otherwise, no changes are made to these file descriptors.
作者: qq120848369 发布时间: 2011-11-07
用system函数,exec,都可以!
作者: ido158 发布时间: 2011-11-07
补充 在命令行下
exec ("/www/wdlinux/php-5.2.17 bgn.php >/dev/null &")
bash /www/wdlinux/php-5.2.17 bg.php >/dev/null &
都出错
bash: syntax error near unexpected token `"bgconversion.php >/dev/null &"'
exec ("/www/wdlinux/php-5.2.17 bgn.php >/dev/null &")
bash /www/wdlinux/php-5.2.17 bg.php >/dev/null &
都出错
bash: syntax error near unexpected token `"bgconversion.php >/dev/null &"'
作者: nmxkxp 发布时间: 2011-11-07
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28