Commits

Anonymous committed 38ad5a7

Add --immortal option.

refs #8886 (spent 0.25)

  • Participants
  • Parent commits ad156dd
  • Tags 1.1.52

Comments (0)

Files changed (4)

   { "gid", "GIMLI_GID", OPT_INTEGER, &run_as_gid },
   { "arg0", "GIMLI_ARG0", OPT_STRING, &arg0 },
   { "run-once", "GIMLI_RUN_ONCE", OPT_INTEGER, &run_only_once },
+  { "immortal", "GIMLI_IMMORTAL", OPT_INTEGER, &immortal_child },
   { NULL }
 };
 
 extern int debug, quiet, detach, watchdog_interval, watchdog_start_interval,
   watchdog_stop_interval, do_setsid, respawn_frequency;
 extern int run_only_once;
+extern int immortal_child;
 extern int run_as_uid, run_as_gid;
 extern char *glider_path, *trace_dir, *gimli_progname, *pidfile, *arg0;
 extern int gimli_nthreads;
 
 int respawn = 1;
 int run_only_once = 0;
+int immortal_child = 0;
 int should_exit = 0;
 int debug = 0;
 int quiet = 0;
     }
     time(&last_spawn);
     wait_for_child(p);
-    if (p->force_respawn) {
+    if (p->force_respawn || immortal_child) {
       respawn = 1;
       free(p);
     } else if (WIFSIGNALED(p->exit_status) && (

File man/monitor.1

 id.  The corresponding environmental variable is
 .B GIMLI_GID
 .TP
+.B immortal=1
+Will monitor the child, tracing it in the event of a fault, and will restart
+the child regardless of how the child is terminated; whether it was due
+to abnormal termination or due to the child process exiting.
+The corresponding environmental variable is
+.B GIMLI_IMMORTAL
+.TP
 .B respawn-frequency=seconds
 In the event that
 .B monitor