mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(main) [!defined _POSIX_SOURCE]:
Use simpler "signal (sig, SIG_IGN)" rather than sigaction equivalent.
This commit is contained in:
1 parent
aa3d650a1b
commit
bb5a8d159c
1 file changed
+1
-12
+1
-12
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user