Php exec() return code is -1 when in a forked process, but 0 in a normal script
Posted
by fb1
on Stack Overflow
See other posts from Stack Overflow
or by fb1
Published on 2010-06-17T16:20:44Z
Indexed on
2010/06/17
16:33 UTC
Read the original article
Hit count: 134
php
I am using exec() inside a a script that runs as a daemon and forks child processes using the pear class Net_Server.
I am getting a strange issue whereby the return code (the third param of of exec) comes back as -1. When I run the command on the command line, or with exec in a normal php script the return code is 0 as it should be. Anyone have any idea why this is happening, and how to fix it?
© Stack Overflow or respective owner