[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sleep & Co on Linux
From: |
Sven Mascheck |
Subject: |
Re: sleep & Co on Linux |
Date: |
21 Jun 2001 23:48:57 +0200 |
User-agent: |
tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u)) |
Paul Jarc <prj@po.cwru.edu> wrote:
> But Dan's example *was* related to disown
Actually only partly :) It's two problems:
- does a job release it's "current job" status while being stopped?
- does the "next recent" job become the current one, if the current
one gets "disowned" (reomved from the job table)?
( > not sleep's premature termination.
That's right, thanks for getting me out of the SIGCONT trap. )
> The second sleep was started in the background, thus it did not become
> the current job.
But this is what went wrong first. The _stopped_ job didn't release
it's "current job" status. The second "sleep &" actually should(?)
have become the current one at once.
The manpage is not 100% clear,
(but ksh88/ksh93 in contrast doesn't care if the "current job"
is stopped while you launch a new one).
bash(1), JOB CONTROL
shell's notion of the current job, which is the last job
stopped while it was in the foreground or started in the
background.
One might argue for both jobs with this sentence.
Anyway, the second becomes the current job, if you "bg" the first
("so that this sort of reacts again?"), on any other OS (but Linux).
It doesn't matter when exactly you do "bg" the first sleep
(before or after launching the second one).
> Then since the current job was just disowned, fg had no current
> job to operte on.
But the second question is if the next recent job should _become_
the new "current job"--the same way as it happens e.g. if you just
kill the current one. The paragraph for disown in bash(1)
doesn't help me here, either.
Sven
- disown, fg, jobs, Dan Jacobson, 2001/06/20
- Re: disown, fg, jobs, Paul Jarc, 2001/06/20
- sleep & Co on Linux (was: disown, fg, jobs), Sven Mascheck, 2001/06/21
- Re: sleep & Co on Linux (was: disown, fg, jobs), Tim Mooney, 2001/06/21
- Re: sleep & Co on Linux (was: disown, fg, jobs), Paul Jarc, 2001/06/21
- Re: sleep & Co on Linux,
Sven Mascheck <=
- Re: sleep & Co on Linux, Sven Mascheck, 2001/06/23
Re: disown, fg, jobs, Dan Jacobson, 2001/06/22