Re: [PHP] background processing / forking

2001-03-06 Thread Mukul Sabharwal
Disclaimer: The following post contains C code for *nix! Viewer discretion recommended! Hi, I'm back, I couldn't resist you mentioning C, so as you did, big fault, the code that follows is probably much better than exec, as an stderr terminal will still be attached, but anyway: exec("your

Re: [PHP] Background processing / forking

2001-03-06 Thread Anders Johannsen
> Now the problem is that the C program will be running > for longs periods like maybe half or even an hour. So > i would basically want to just execute the program and > return control to the script immediately so that the c > program continues it's work. > > it's easy with forking. but i dont se

Re: [PHP] Background processing / forking

2001-03-06 Thread Mukul Sabharwal
Hi Natasha, Well the probably easiest shitty way to do it is: exec("theprogram 1> /some/file 2>&1 &"); would exec()ute theprogram and will put it's output in /some/file and stderr's output also in the /some/file, and & at last signifies the backgroundness of the program. however as you mention

[PHP] Background processing / forking

2001-03-06 Thread Natasha
hey, i wanted to know if there's a fork function in php, cause i don't see it in the manual. I basically wanna call a C program from PHP. Now the problem is that the C program will be running for longs periods like maybe half or even an hour. So i would basically want to just execute the progra