One other thing.  This:

+  sigaction (signal, NULL, &act);
+  act.sa_handler = SIG_DFL;
+  sigaction (signal, &act, NULL);

can be done more simply as 'signal (sig, SIG_DFL)' (assuming you change the local variable's name from 'signal' to 'sig').



Reply via email to