On 2/11/11 4:00 PM, Oleg Nesterov wrote: > I already tried to discuss this, but you didn't reply ;) See > http://www.mail-archive.com/bug-bash@gnu.org/msg08528.html > > So, if I understand correctly, you mean that > > #!/bin/sh > > interactive_application > > echo DONE > > shouldn't be interrupted by SIGINT after interactive_application exits. > For example, it can be a text-editor which treats SIGINT specially. > > But, in this case, shouldn't we fix the script above? In this case > the shell and the application should not run in the same tty->pgrp > group, or we can add "trap SIGINT".
That's not a scalable solution, and doesn't take into account all programs that use SIGINT as a normal part of their processing and all scripts that might call them. I would argue that the intended bash behavior, modulo any race conditions that exist, is what the user expects to happen. 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/