1
diff --git a/lib/common/utils.c b/lib/common/utils.c
2
index 527c9e0..b45e620 100644
3
--- a/lib/common/utils.c
4
+++ b/lib/common/utils.c
5
@@ -1118,31 +1118,36 @@
6
crm_err("%s: Triggered fatal assert at %s:%d : %s", function, file, line, assert_condition);
11
- crm_crit("%s: Cannot create core for non-fatal assert at %s:%d : %s",
12
- function, file, line, assert_condition);
19
+ crm_crit("%s: Cannot create core for non-fatal assert at %s:%d : %s",
20
+ function, file, line, assert_condition);
23
+ } else if(pid == 0) {
29
- default: /* Parent */
30
- crm_err("%s: Forked child %d to record non-fatal assert at %s:%d : %s",
31
- function, pid, file, line, assert_condition);
32
- crm_write_blackbox(SIGTRAP, NULL);
33
+ /* Parent process */
34
+ crm_err("%s: Forked child %d to record non-fatal assert at %s:%d : %s",
35
+ function, pid, file, line, assert_condition);
36
+ crm_write_blackbox(SIGTRAP, NULL);
39
- rc = waitpid(pid, &status, 0);
40
- if (rc < 0 && errno != EINTR) {
41
- crm_perror(LOG_ERR, "%s: Cannot wait on forked child %d", function, pid);
44
+ rc = waitpid(pid, &status, 0);
46
+ return; /* Job done */
49
- } while (rc < 0 && errno == EINTR);
50
+ } while(errno == EINTR);
53
+ if (errno == ECHILD) {
54
+ /* crm_mon does this */
55
+ crm_trace("Cannot wait on forked child %d - SIGCHLD is probably set to SIG_IGN", pid);
58
+ crm_perror(LOG_ERR, "Cannot wait on forked child %d", pid);