PHP exec isn't doing a waitpid. Eh?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SM Ryan

    #1

    PHP exec isn't doing a waitpid. Eh?

    On Unix (MacOSX 10.3), I have an exec

    $rs = array(); $rc = 0;
    exec("program yadda yadda yadda",$rs,$rc) ;

    and the program does a fork with parent exitting immediately
    (to daemonise the program). With ps I can see the parent as a
    zombie, by the PHP code never reaps the exit code or returns
    from the exec. This was working fine yesterday and today suddenly
    stopped working. Does anybody have a suggestion what can be
    wrong with this fershinlungger code?

    --
    SM Ryan http://www.rawbw.com/~wyrmwif/
    There are subtler ways of badgering a witness.
  • Colin McKinnon

    #2
    Re: PHP exec isn't doing a waitpid. Eh?

    SM Ryan wrote:
    [color=blue]
    > On Unix (MacOSX 10.3), I have an exec
    >
    > $rs = array(); $rc = 0;
    > exec("program yadda yadda yadda",$rs,$rc) ;
    >
    > and the program does a fork with parent exitting immediately
    > (to daemonise the program).[/color]

    I'm fumbling here, but does it call setsid() after the fork? Otherwise the
    child's in the same process group as PHP.

    HTH

    C.

    Comment

    Working...