Re: [PHP-DEV] creating detached processes in PHP

2004-11-23 Thread Jed Smith
Wez Furlong wrote: > it's on my very long TODO list. > > --Wez. No rush. If I was 50% less lazy I might cvs co it and look at it for a few minutes, and say "aw hell, I'll just wait for Wez and Ilia," but I'm too lazy to do even that, so ... I'll just wait for Wez and Ilia. =) Jed -- _

Re: [PHP-DEV] creating detached processes in PHP

2004-11-23 Thread [EMAIL PROTECTED]
win32: copy the code from proc_open(), just leave the pipes stuff out. By detached I mean - start and leave running. for most unixes: pid = fork(); if (pid == 0) { close(0); close(1); close(2); // mask out SIGHUP signal - unfortunately I don't remember the calls for unixes e

Re: [PHP-DEV] creating detached processes in PHP

2004-11-22 Thread Wez Furlong
On Tue, 23 Nov 2004 08:28:03 +0200, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > The bottom line, is that in PHP there is no simple and consistent > cross-platform way to create a detached child process. > Being a system programmer, this shouldn't be too much of an obstacle > for me, but at thi

Re: [PHP-DEV] creating detached processes in PHP

2004-11-22 Thread Wez Furlong
On Mon, 22 Nov 2004 18:30:34 -0800, Jed Smith <[EMAIL PROTECTED]> wrote: > Sure it does, it's just a different model. > http://msdn.microsoft.com/";> > ... That's not fork() ;) > If it will, CreateProcess() will work, like I said. Look into What do you think proc_open() does? :) > http://pecl.p

Re: [PHP-DEV] creating detached processes in PHP

2004-11-22 Thread Jed Smith
[EMAIL PROTECTED] wrote: Unfortunately no. On win32 for instance, fork() doesn't exist at all. Sure it does, it's just a different model. http://msdn.microsoft.com/";> One of the largest areas of difference is in the process model. UNIX has fork; Win32 does not. Depending on the use of fork and th

Re: [PHP-DEV] creating detached processes in PHP

2004-11-22 Thread Christian Schneider
Wez Furlong wrote: Will "app &" work do what you want on unix and "start app" do what you want on win32? On unix you probably want to do something like "nohup app /dev/null 2&1 &" to completely detach. - Chris -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://ww

Re: [PHP-DEV] creating detached processes in PHP

2004-11-22 Thread [EMAIL PROTECTED]
I've tried it all, actually, on Win32. "start app" will start another console window for console applications, and wait until it closes. for windowed applications it would wait for the application to finish. same with "start /b app". I would write an implementation myself, but I'm not familiar wi

Re: [PHP-DEV] creating detached processes in PHP

2004-11-22 Thread Wez Furlong
On Mon, 22 Nov 2004 10:47:10 +0200, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Unfortunately no. > On win32 for instance, fork() doesn't exist at all. > > There is a need for a cross-platform unified interface. I suspect that such a thing is a myth in the case of PHP; we already have cruft fo

Re: [PHP-DEV] creating detached processes in PHP

2004-11-22 Thread [EMAIL PROTECTED]
Unfortunately no. On win32 for instance, fork() doesn't exist at all. There is a need for a cross-platform unified interface. P.S. please always "reply to all" On Mon, 22 Nov 2004 02:38:41 -0600, Jeremy Johnstone <[EMAIL PROTECTED]> wrote: > If I am following you right, wouldn't a fork() followe