Link to home
Start Free TrialLog in
Avatar of yliu8
yliu8

asked on

spawn a process?

I need to write a CGI program that
can spawn a sub process. The sub
process is very time consuming. So I
want the CGI program to send browser a sub process id number and quit HTTP connection before the sub process finished.  

Later, user can check the status of the sub process by its id number.  This is under Unix. Is there some sample codes doing this?
Avatar of TYoung
TYoung

UNIX:

system("/programdir/bin/program &");

The & tells the starter that it can go on without it (dont wait).

I don't know how to get a system PID, sorry.
ASKER CERTIFIED SOLUTION
Avatar of jhurst
jhurst

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial