On 2/8/11 3:09 PM, Oleg Nesterov wrote: > On 02/08, Chet Ramey wrote: >> >> On 2/8/11 1:21 PM, Oleg Nesterov wrote: >>> Hello, >>> >>> We believe that the non-interactive bash doesn't handle CTRL-C >>> correctly, please look into the attached thread from lkml for >>> more details. >> >> Read http://www.cons.org/cracauer/sigint.html > > oooh... it is huge! will try tomorrow. > >> and see if you still >> feel the same way. > > Which way? ;) > > Please note that I wasn't sure when I sent this bug-report. Although > as a bash user I certainly dislike the fact you can never interrupt > the shell script reliably. Lets return to the first example, > > $ sh -c 'while true; do /bin/true; done' > > Do you think it is OK to miss ^C in this case?
That was kind of a loaded question, wasn't it? But as I said, it took me a while to reproduce it. I was never able to need more than one or two ^C to kill the loop. > Once again, I won't persist if you think this is fine, and I'll try > to read the docs above tomorrow. But I'll appreciate very much if > you can explain why exactly this is fine. So far I am looking at > > WUE shell would not have this problem, since they discontinue > the script on their own. But as I said, they don't support > programs using SIGINT for non-exiting purposes > > part of the documentation, but can't understand. This was explained later, I think, but the basic idea is that some programs catch SIGINT and either handle it or exit without killing themselves with SIGINT. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/