progamming approach review, child processes

astar astar at spamcop.net
Tue Nov 23 16:13:32 EST 2010


So I have not done much with child processes before.

I have an input of programs to be updated, a child process that does
the
compiles and links (with a log output to an individual file), and a
process wait
at the end.  Except the child process can hang (at the moment, the
problem that might show up is: waiting for
input).  At which point a convenience  becomes a  hinderance.

As it happens the idea of doing the compiles in parallel is supported
by the
ports system I am working with.  So I thought I could avoid the wait
syntax, do
a lot of children, save all the process hmm I am not sure what to call
the
pointers,  and after a while interrogate the process information to
see if all
the children got done.  At some point, I could think a child is hung
and maybe
do some useful reporting.  Realize that this might be the next day
because the
compiles might take a while.

Is this a reasonable approach?

Thank you for your consideration.

Possibly pointless information:

openbsd 4.8 workstation, packages, but using the port system, want
only to
compile packages I have installed.  There is a utility to tell me
which packages
are out of date.  And I really know  I could use pkg_add -u.  I did
some
attachments of the programs, but I suppose they will get scrubbed..

python is I think 2.6.5?






More information about the Python-list mailing list