Varie correzioni, completata revisione capitolo sull'I/O su file
[gapil.git] / sources / SigHand.c
index 3fb588a99458b1903cded34effa155f5159b6504..a37fac5ab28daa68412e392ce4e07f431a5b7fcf 100644 (file)
  *
  * Author: S. Piccardi Dec. 2002
  *
- * $Id: SigHand.c,v 1.6 2003/05/06 11:29:16 piccardi Exp $
- *
  *****************************************************************************/
-#include <errno.h>                               /* error simbol definitions */
-#include <stdio.h>                                 /* standard I/O functions */
-#include <signal.h>                          /* signal handling declarations */
-#include <sys/types.h>
-#include <sys/wait.h>
+#include <errno.h>       /* error definitions and routines */
+#include <stdio.h>      /* standard I/O library */
+#include <signal.h>      /* signal constants, types and functions */
+#include <sys/types.h>   /* primitive system data types */
+#include <sys/wait.h>   /* process termination constants and functions */
 
 #include "Gapil.h"
 #include "macros.h"
@@ -97,7 +95,6 @@ inline SigFunc * SignalRestart(int signo, SigFunc *func)
  * Generic handler for SIGCHLD signal
  * 
  * Simone Piccardi Dec. 2002
- * $Id: SigHand.c,v 1.6 2003/05/06 11:29:16 piccardi Exp $
  */
 void HandSigCHLD(int sig)
 {
@@ -110,10 +107,10 @@ void HandSigCHLD(int sig)
     do {
        errno = 0;
        pid = waitpid(WAIT_ANY, &status, WNOHANG);
-       if (pid > 0) {
-           debug("child %d terminated with status %x\n", pid, status);
-       }
-    } while ((pid > 0) && (errno == EINTR));
+//     if (pid > 0) {
+//         debug("child %d terminated with status %x\n", pid, status);
+//     }
+    } while (pid > 0);
     /* restore errno value*/
     errno = errno_save;
     /* return */