summaryrefslogtreecommitdiff
path: root/src/nohup.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-04-20 10:44:42 +0000
committerJim Meyering <jim@meyering.net>2004-04-20 10:44:42 +0000
commitbb5a8d159c426d25161f91dece348251f7bd5df9 (patch)
treef730dd36c7ea48260dc20acde368bc932ecad92a /src/nohup.c
parentaa3d650a1b59520d895fd8be5a3e0bffdc9c7d08 (diff)
downloadcoreutils-bb5a8d159c426d25161f91dece348251f7bd5df9.tar.xz
(main) [!defined _POSIX_SOURCE]:
Use simpler "signal (sig, SIG_IGN)" rather than sigaction equivalent.
Diffstat (limited to 'src/nohup.c')
-rw-r--r--src/nohup.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/nohup.c b/src/nohup.c
index f476d8483..c2b83c90e 100644
--- a/src/nohup.c
+++ b/src/nohup.c
@@ -158,18 +158,7 @@ main (int argc, char **argv)
error (NOHUP_FAILURE, errno, _("failed to redirect standard error"));
}
- /* Ignore hang-up signals. */
- {
-#ifdef _POSIX_SOURCE
- struct sigaction sigact;
- sigact.sa_handler = SIG_IGN;
- sigemptyset (&sigact.sa_mask);
- sigact.sa_flags = 0;
- sigaction (SIGHUP, &sigact, NULL);
-#else
- signal (SIGHUP, SIG_IGN);
-#endif
- }
+ signal (SIGHUP, SIG_IGN);
{
int exit_status;