From: Jilles Tjoelker <jilles@stack.nl>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Michael Welsh Duggan <mwd@cert.org>, dash@vger.kernel.org
Subject: Re: Question about job control in non-interactive shells
Date: Fri, 13 Jan 2012 16:49:26 +0100 [thread overview]
Message-ID: <20120113154926.GA42715@stack.nl> (raw)
In-Reply-To: <20120109163745.GA23825@burratino>
On Mon, Jan 09, 2012 at 10:37:45AM -0600, Jonathan Nieder wrote:
> Michael Welsh Duggan wrote:
> > I am trying to determine why:
> > dash -c "sleep 5 & kill %1"
> > results in:
> > dash: 1: kill: No such process
> You are probably looking for the -m option.
The cause is that the -m option ("job control") enables running commands
in separate process groups, and dash follows literally what POSIX says
about kill %job: a background process group should be signaled; however,
there is no background process group. Some shells signal one or more
processes they know are part of the job in this case, but dash calls
kill() on a process group that is guaranteed not to exist.
--
Jilles Tjoelker
next prev parent reply other threads:[~2012-01-13 16:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-09 16:17 Question about job control in non-interactive shells Michael Welsh Duggan
2012-01-09 16:37 ` Jonathan Nieder
2012-01-13 15:49 ` Jilles Tjoelker [this message]
2012-01-15 3:53 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120113154926.GA42715@stack.nl \
--to=jilles@stack.nl \
--cc=dash@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=mwd@cert.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox