[torquedev] Understanding TFinalizeChild in src/resmom/start_exec.c

Garrick Staples garrick at clusterresources.com
Thu Aug 3 16:49:18 MDT 2006


On Thu, Aug 03, 2006 at 04:23:48PM -0700, Diwaker Gupta alleged:
> Hi all,
> 
> I'm trying to understand exactly how the code in TFinalizeChild() (in
> start_exec.c) works (I'm working with the 2.1.1 code base). At a very
> high level:
> 
> o the first fork() creates a child which becomes the writer process,
> parent continues
> 
> o a second fork creates a child which continues with setting up the
> job, the parent becomes the reader process (the parent is the original
> pbs_mom process?)
> 
> o there is a final fork() after which the execve() are executed. It is
> this segment that I'm having a hard time figuring out. The comments
> talk about "parent does the shell" and "child does demux". I couldn't
> find the literal DEMUX being used anywhere else in the code, so that
> was a bit baffling.  Which of these becomes the real job and what
> happens to the other?

"demux" is a seperate program that multiplexes stdio from multiple nodes
into the spooled stdio files.

src/resmom/Makefile adds -DDEMUX=$(sbindir)/pbs_demux to CFLAGS and
pbs_demux is built out of src/cmds/



More information about the torquedev mailing list