Sujet : bash/ksh differences (fg and other job control commands) (Was: (bash) How (really!) does the "current job" get determined?)
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.unix.shellDate : 07. Oct 2024, 14:19:17
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <ve0n4l$2toqq$1@news.xmission.com>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
ve0lmv$1nkmd$1@dont-email.me>,
Janis Papanagnou <janis_papanagnou+
ng@hotmail.com> wrote:
...
Incidentally Bolky/Korn notes: "When a command in this
section [Job Control] takes an argument called /job/, /job/ can be
a process id." - I don't know about Bash, but Kornshell at least
seems to have done it right.
FWIW, I just tested with the "ksh" on this system, and fg does accept a pid
argument.
So, yes, ksh seems to have gotten it right. Note that ksh seems to have
lots of different versions and forks, so I have no idea what exactly I was
testing. I assume you could test on whatever version you normally use.
So, it sounds like I actually have two possible bugs to report to the bash
maintainers:
1) The original thread topic - why the most recently launched job
doesn't (always) become the "current job" (under certain
circumstances). The problem is I haven't really identified what those
circumstances are.
2) Why fg doesn't take a pid arg. Note that a lot of the bash design
is based on features originally implemented in ksh and so they do pay
attention to how ksh does things.
-- The randomly chosen signature file that would have appeared here is more than 4lines long. As such, it violates one or more Usenet RFCs. In order to remainin compliance with said RFCs, the actual sig can be found at the following URL: http://user.xmission.com/~gazelle/Sigs/CLCtopics