[Pikes-peak-pm] Firing Off Child Processes

John Evans jtevans at kilnar.com
Thu Oct 7 06:25:52 CDT 2004


Greetings,
	Things have been dead here for a while. Maybe I can liven stuff up 
with a problem that I'm puzzling over.

I have several datafiles in a directory. I need to process each one, but 
the processing can take anywhere from a few seconds to fifteen minutes. I 
don't want the entire process waiting on a long one while shorter ones are 
in line to be done.

I assume that I need to fire off a child process to handle the actual 
processing, but I'm not sure how to go about doing this. I thought fork() 
was the answer, but it appears (I may be missing something here, though) 
that fork() will only make a new copy of the current program. That's not 
what I'm looking for, but if fork() is the only option that I have, then I 
can make it work.

Are there other ways of doing mutliple processes from a master process?

-- 
John Evans
http://jtevans.kilnar.com/

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s++:- a- C+++>++++ ULSB++++$ P+++$ L++++$
E--- W++ N+ o? K? w O- M V PS+ !PE Y+ PGP t(--) 5-- X++(+++)
R+++ tv+ b+++(++++) DI+++ D++>+++ G+ e h--- r+++ y+++
------END GEEK CODE BLOCK------



More information about the Pikes-peak-pm mailing list