]> git.ipfire.org Git - thirdparty/coreutils.git/commit
- ls could incorrectly restore color if multiple signals
authorJim Meyering <jim@meyering.net>
Wed, 21 Apr 2004 12:51:27 +0000 (12:51 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 21 Apr 2004 12:51:27 +0000 (12:51 +0000)
commiteae1b7f862ae45e7898304cd81332f12bd8fbdf7
treed88633fead412ecac5a3d6253a5865370460f43e
parent4441496397d003bdae8bfe21c4546d3ea02dcee2
   - ls could incorrectly restore color if multiple signals
     arrived nearly simultaneously.

(main): Rewrite signal-catching code to make it
similar to other coreutils programs.  When processing signals,
block all signals that we catch, but do not block signals that we
don't catch.  Avoid problems with unsigned int warnings.

(sighandler) [defined SA_NOCLDSTOP]:
Use simpler "signal (sig, SIG_DFL)" rather than sigaction equivalent.

(sighandler) [!defined SA_NOCLDSTOP]: Reset signal
handler to self, not to SIG_IGN, since SIGTSTP can be received more than once.
(main): Use SA_RESTART, as that is simpler than checking for EINTR
failures all over the place.
src/ls.c