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 <[EMAIL PROTECTED]> 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:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 


=====
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/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to