Re: Background processing / forking
| From: | Mukul Sabharwal | Date: | Tue, 06 Mar 2001 18:56:26 +0000 |
| Subject: | Re: Background processing / forking | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-42794@lists.php.net to get a copy of this message | ||
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 mentioned C, the better way could fork
it in C, and since i don't wanna get offtopic i won't
mention it here.
-:)
HTH
--- Natasha <natashaklej@yahoo.com> wrote: > 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 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 see it in php.
>
> thx.
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
To find out more about me : http://www.geocities.com/mimodit
My bookmarks are available @ http://mukul.free.fr
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/