Le Sun, 8 Jul 2012 17:20:01 +0000 (UTC)
Thorsten Glaser <[email protected]> a écrit:

> >BTW, I recently submitted on the dash ML the idea that kill could
> >reach "%" jobs independently from the state of the job control flag.
> 
> If you really need that, you’re welcome to submit a patch ☺

If was able to do that, be sure it would have been a patch attached to
my first mail... but my C is... yes even worse than that. ☺

What is weird is that it does not work even with $!, which is a PID.
This never ends:

  set -m
  cat /dev/zero >/dev/null &
  kill -s "TERM" $!
  wait

(... sorry, I torture you... ;)

> >As a matter of fact, if it's not a requirement, POSIX seems to
> >encourage it:
> >
> >  The jobs utility is not dependent on the job control option, as are
> >  the seemingly related bg and fg utilities because jobs is useful for
> 
> Right. The jobs, fg, bg commands *are* available in scripts and
> other places where full job control isn’t enabled, unless job
> control is not compiled in due to OS bugginess.

Is it the case with Linux?
 
> [ signal numbers ]
> >Not all of them, indeed... but as far as it makes sense I try to
> >stick with POSIX shell for scripting. :)
> 
> Note that, at least for the trap builtin, signal numbers are
> not accepted by POSIX, only signal names. (I’m not in the mood
> to check it for kill right now as I have a headache.)
> 
>       trap 'exit 1' 1 2 3 13 15  # not POSIX!

Well, it should works, but only with the POSIX signals:

 http://pubs.opengroup.org/onlinepubs/009695399/utilities/trap.html

I agree though that using signal numbers is not a very good
practise...

++
Seb

Reply via email to