Re: jobs in jobs; jobs control



In article <1179897190.132584.60250@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Ben <chinese.central@xxxxxxxxxxxxxx> wrote:

When I did a for loop to start some background jobs
i.e
for ... do
command &
done &

when I type jobs, I can only see the for loop jobs, after the for loop
finishes, I can't see any jobs with the command jobs... I know the
"hidden" jobs are running since they are producing data... how can I
job control them?

A process can only control its child processes, not further descendant
processes. By putting the loop in the background you require a child
for the loop, and as a result all the commands run in grandchild
processes, which your original shell can't control.

If your system has the "pstree" command this is a way to see this
process hierarchy.

--
Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
.



Relevant Pages

  • Sol8 and EVA hangs
    ... Secure Path 3.0D is loaded for channel failover. ... retrying command ... # Adapter hard loop ID address to use on the fibre channel bus. ...
    (SunManagers)
  • Summary: Sol8 and EVA hangs
    ... Oct 8 11:00:41 proddb SCSI transport failed: reason 'aborted': ... retrying command ... # Adapter hard loop ID address to use on the fibre channel bus. ... # before reporting I/O errors. ...
    (SunManagers)
  • Re: Using foreach loop to create radiobutton menu
    ... Your foreach loop is not the problem, the problem is how you define the -command. ... The only possible thing the interpreter can do is substitute the current value of range, which is likely the last value once your loop exited. ... One choice is double quotes. ... The double quotes means that $range gets expanded while in the loop, long before the puts command actually runs. ...
    (comp.lang.tcl)
  • Re: JES2 conversion delay
    ... there are many jobs ... History of various JES2 elements might help to know when it is CNVT is ... How many systems are involved in this environment? ... check out the $D PERFDATA command ...
    (bit.listserv.ibm-main)
  • Re: JES2 conversion delay
    ... there are many jobs ... History of various JES2 elements might help to know when it is CNVT is ... How many systems are involved in this environment? ... check out the $D PERFDATA command ...
    (bit.listserv.ibm-main)