SIGUNUSED

Eugene Grosbein eugen at eg.sd.rdtc.ru
Sat Nov 7 07:41:08 UTC 2009


On Sat, Nov 07, 2009 at 03:17:49AM +0100, Alexander Best wrote:

> as a side not:
> our own easyedit does exactly what you said wasn't a good programming style.
> ;) check line 554 of contrib/ee/ee.c:
> 
>         for (counter = 1; counter < 24; counter++)
>                 signal(counter, SIG_IGN);

Easy Editor is contributed software (now lives in contrib/).

Such naive signgal handling had already hurt it in the past,
f.e. plain ignore of SIGTTIN, SIGTTOU without sanity checks for
STDIN_FILENO, STDOUT_FILENO made it CPU hog for 'ee file &'
or 'ee </dev/null' in early versions.

Eugene Grosbein


More information about the freebsd-hackers mailing list