|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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? Regards |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Ben 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? > > Regards > run the loop in the foreground: for ... do command & done jobs -- Michael Tosch @ hp : com |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
In article <1179897190.132584.60250@u30g2000hsc.googlegroups. com>,
Ben <chinese.central@googlemail.com> 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@alum.mit.edu 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 *** |
|
![]() |
| Outils de la discussion | |
|
|