Le Sun, 8 Jul 2012 19:23:37 +0000 (UTC)
Thorsten Glaser <[email protected]> a écrit:

> Seb dixit:
> 
> >This never ends:
> 
> Ah but cat is a builtin, not a separate process.

Oh... it's a copy & paste error. I know the cat built-in is a (cool)
feature of mksh. I've just retried with /bin/cat to be sure, it
indeed hangs. I've also tried with "/bin/oawk '{print}' 
< /dev/zero >/dev/null" (on my machine oawk is the Kernighan's AWK,
not a GNU or Linux specific software), with the same result.

> You probably should able to kill the subshell. Hm.
> I added an exclusion to allow SIGINT in the cat code,
> maybe more are needed. Suggestions/patches welcome,
> signal handling in UNIX is not one of my strengths.

I'm afraid I am not stronger than you on the subject. I don't use the
signals very often. The only way I can help you is as beta-tester, I
think (it's not much, I know... :)

What I don't understand is that all works perfectly in an interactive
shell... a PID should be targeted the same in every cases, shoudn't
it? Otherwise, it can be really annoying in a rc script (stopping a
daemon often implies to use its PID). All this story draws me to think
I maybe should take the habit to use the system's kill to write this
kind of script. ;)

> >> 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?
> 
> Not normally, no. (Otherwise fg will _always_ throw an error.)

fg works well, no problem.

++
Seb.

Reply via email to