[erlang-questions] run_erl.c question in R11B-4

Serge Aleynikov serge@REDACTED
Mon Apr 2 21:39:34 CEST 2007


Hi,

I see that a SIGCHLD handler was added in run_erl.c in the R11B-4. 
However the implementation of the signal handler function 
(catch_sigchild) has nothing in the body.

I believe it should be:

--- ./erts/etc/unix/run_erl.c.orig      2006-11-22 10:57:35.000000000 -0500
+++ ./erts/etc/unix/run_erl.c   2007-04-02 15:23:45.000000000 -0400
@@ -676,6 +676,10 @@

  static void catch_sigchild(int sig)
  {
+  int stat;
+  status("Child terminated - exiting\n");
+  wait(&stat);  /* Ensure that a child entry in the process table is 
cleared, and release child's PID */
+  exit(2);
  }


This way the death of the emulator will cause the death of run_erl. 
Otherwise in presence of the -heart option it's possible to get in a 
situation when run_erl is not properly restarted (*).

Serge

(*) http://www.erlang.org/ml-archive/erlang-questions/200601/msg00473.html

-- 
Serge Aleynikov
Routing R&D, IDT Telecom
Tel: +1 (973) 438-3436
Fax: +1 (973) 438-1464



More information about the erlang-questions mailing list