+ if (pid == 0) {
+ char *buf;
+
+ if (getenv("CTDB_DEBUG_HUNG_SCRIPT") != NULL) {
+ debug_hung_script = getenv("CTDB_DEBUG_HUNG_SCRIPT");
+ }
+
+ buf = talloc_asprintf(NULL, "%s %d",
+ debug_hung_script, state->child);
+ system(buf);
+ talloc_free(buf);
+
+ /* Now we can kill the child */
+ kill(state->child, SIGTERM);
+ _exit(0);
+ }
+
+ /* Don't kill child until timeout done. */
+ state->child = 0;