bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash turns off job_control when non-interactive, but also more..


From: Jordan Hubbard
Subject: Re: bash turns off job_control when non-interactive, but also more..
Date: Sat, 24 Apr 2004 16:50:33 -0700

Cool, thanks.  Let me know when you release the new version, eh?

Regards,

- Jordan

On Apr 24, 2004, at 2:32 PM, Chet Ramey wrote:

We have some UNIX conformance test suites which are failing, specifically
they're failing on the %% job argument essentially as follows:

#!/bin/bash
cat &
kill -1 %% && echo I killed it || echo could not kill it

If you run this script, it will emit an error saying the %% argument to kill is invalid and it could not kill the job. Looking into builtins/kill.def, you see that it specifically checks interactive and job_control (both of which are 0 in the case of a shell script) and disables the code which would expand the %% form in the script. Are you sure this is correct? The Open Group,
which uses this in a number of its job control test scripts, doesn't
appear to think so...  Thanks!

OK, we'll try it.  The next version of bash will not require job
control to be enabled when using job id notation as arguments to
`jobs', `kill', and `wait'.

The necessary plumbing is all there; we'll see how it goes.

Chet

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live...Laugh...Love
Chet Ramey, ITS, CWRU chet@po.cwru.edu http://tiswww.tis.cwru.edu/~chet/

--
Jordan K. Hubbard
Engineering Manager, BSD technology group
Apple Computer





reply via email to

[Prev in Thread] Current Thread [Next in Thread]