Commit 367e36d0 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(main): Call link_ansi(). Only set SA_RESTART if it is available.

parent 0ff0e53a
......@@ -66,6 +66,7 @@
# include <strings.h> /* Needed on AIX 4.2 due to bzero */
#endif
#include "linkansi.h"
#include "unused.h"
sig_atomic_t ctr = 0;
......@@ -90,6 +91,8 @@ main(void)
time_t after;
pid_t pid;
link_ansi();
if ((pid = fork()) < 0)
{
perror("fork");
......@@ -106,7 +109,11 @@ main(void)
#ifdef HAVE_STRUCT_SIGACTION
sigemptyset(&act.sa_mask);
#ifdef SA_RESTART
act.sa_flags = SA_RESTART;
#else
act.sa_flags = 0;
#endif
act.sa_handler = my_sighandler;
if (sigaction(SIGHUP, &act, NULL) < 0)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment