summaryrefslogtreecommitdiff
path: root/src/sort.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2007-01-20 09:54:20 +0100
committerJim Meyering <jim@meyering.net>2007-01-20 09:54:20 +0100
commitbdbd5d31f810a33f4922d63b1852ab96a5fc4a01 (patch)
tree19d2042c6a1673ba5c3d46b2afc1d961937b9584 /src/sort.c
parent3d63c453d564a4e4d456a868beef8bcbd6e9abb2 (diff)
downloadcoreutils-bdbd5d31f810a33f4922d63b1852ab96a5fc4a01.tar.xz
Standardize on list of signals when an app catches signals.
* src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL, SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ. * src/ls.c (main): Likewise (except SIGPIPE was already caught). Note that ls.c is special, as it also catches SIGTSTP. * src/sort.c (main): Likewise. Also catch SIGQUIT. More details in <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
Diffstat (limited to 'src/sort.c')
-rw-r--r--src/sort.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/sort.c b/src/sort.c
index 326866f29..8a2279637 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -2350,7 +2350,26 @@ main (int argc, char **argv)
{
size_t i;
- static int const sig[] = { SIGHUP, SIGINT, SIGPIPE, SIGTERM };
+ static int const sig[] =
+ {
+ /* The usual suspects. */
+ SIGALRM, SIGHUP, SIGINT, SIGPIPE, SIGQUIT, SIGTERM,
+#ifdef SIGPOLL
+ SIGPOLL,
+#endif
+#ifdef SIGPROF
+ SIGPROF,
+#endif
+#ifdef SIGVTALRM
+ SIGVTALRM,
+#endif
+#ifdef SIGXCPU
+ SIGXCPU,
+#endif
+#ifdef SIGXFSZ
+ SIGXFSZ,
+#endif
+ };
enum { nsigs = sizeof sig / sizeof sig[0] };
#if SA_NOCLDSTOP