Re: problem - Win95
| From: | Rich Payne | Date: | Thu, 08 Mar 2001 13:41:10 +0000 |
| Subject: | Re: problem - Win95 | ||
| References: | 1 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-559@lists.php.net to get a copy of this message | ||
On Thu, 8 Mar 2001, Mike wrote:
>
> > the system() function in php will start the new process but not detach it.
> > This will result in the php-gtk application seams to be hanging. It
> > simply waits for the new process to terminate !
> >
> > We could add (a windows-only) function called gtk_system() allowing gtk
> > applications to start and detach processes. I dont know if this has any
> > interest for *nix version ?
>
> I imagine a function that spawns another process and detaches it neatly
> would be useful in the *NIX version as well. I wrote a web-based interface
> to dialing out to an ISP under linux using pppd and noticed that the spawned
> process keeps the file descriptors from the parents - when Apache was shut
> down, pppd still had port 80 open and the webserver couldn't be restarted
> until pppd was killed. Of course, I might've just missed something simple.
>
> Point is, I think it's a good idea. ;-)
Is there really a need on *nix? I've been playing around with it on Linux
and an exec ("/bin/something >/dev/null 2>&1 &");
seems to work OK, granted I don't need the output from that though.
I just looked at the process list and init (process 1) is set as the
parent of the spawned process, that looks pretty detached to me.
--rdp
--
Rich Payne
rpayne@alphalinux.org www.alphalinux.org