summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/src/daemon.c12
-rw-r--r--src/src/exim.c10
-rw-r--r--src/src/functions.h2
-rw-r--r--src/src/queue.c2
-rw-r--r--src/src/rda.c2
-rw-r--r--src/src/route.c4
-rw-r--r--src/src/smtp_in.c2
-rw-r--r--src/src/tls.c2
-rw-r--r--src/src/transport.c2
9 files changed, 21 insertions, 17 deletions
diff --git a/src/src/daemon.c b/src/src/daemon.c
index 2813a50d1..aa36a5dc9 100644
--- a/src/src/daemon.c
+++ b/src/src/daemon.c
@@ -418,7 +418,7 @@ if (pid == 0)
"please try again later.\r\n", FALSE);
mac_smtp_fflush();
search_tidyup();
- exim_underbar_exit(EXIT_FAILURE);
+ exim_underbar_exit(EXIT_FAILURE, US"conn-accept");
}
}
else if (*nah) smtp_active_hostname = nah;
@@ -505,7 +505,7 @@ if (pid == 0)
{
mac_smtp_fflush();
search_tidyup();
- exim_underbar_exit(EXIT_SUCCESS);
+ exim_underbar_exit(EXIT_SUCCESS, US"conn-smtp");
}
for (;;)
@@ -533,7 +533,7 @@ if (pid == 0)
cancel_cutthrough_connection(TRUE, US"receive dropped");
mac_smtp_fflush();
smtp_log_no_mail(); /* Log no mail if configured */
- exim_underbar_exit(EXIT_SUCCESS);
+ exim_underbar_exit(EXIT_SUCCESS, US"conn-receive");
}
if (message_id[0] == 0) continue; /* No message was accepted */
}
@@ -556,7 +556,7 @@ if (pid == 0)
/*XXX should we pause briefly, hoping that the client will be the
active TCP closer hence get the TCP_WAIT endpoint? */
DEBUG(D_receive) debug_printf("SMTP>>(close on process exit)\n");
- exim_underbar_exit(rc ? EXIT_FAILURE : EXIT_SUCCESS);
+ exim_underbar_exit(rc ? EXIT_FAILURE : EXIT_SUCCESS, US"conn-setup");
}
/* Show the recipients when debugging */
@@ -692,7 +692,7 @@ if (pid == 0)
(void) deliver_message(message_id, FALSE, FALSE);
search_tidyup();
- exim_underbar_exit(EXIT_SUCCESS);
+ exim_underbar_exit(EXIT_SUCCESS, US"deliver_msg");
}
if (dpid > 0)
@@ -2221,7 +2221,7 @@ for (;;)
else
#endif
queue_run(NULL, NULL, FALSE);
- exim_underbar_exit(EXIT_SUCCESS);
+ exim_underbar_exit(EXIT_SUCCESS, US"queue-runner");
}
if (pid < 0)
diff --git a/src/src/exim.c b/src/src/exim.c
index 9d87c8daa..4e4b6bb75 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -727,9 +727,13 @@ exit(rc);
void
-exim_underbar_exit(int rc)
+exim_underbar_exit(int rc, const uschar * process)
{
store_exit();
+DEBUG(D_any)
+ debug_printf(">>>>>>>>>>>>>>>> Exim pid=%d %s%s%sterminating with rc=%d "
+ ">>>>>>>>>>>>>>>>\n", (int)getpid(),
+ process ? "(" : "", process, process ? ") " : "", rc);
_exit(rc);
}
@@ -4607,7 +4611,7 @@ if (msg_action_arg > 0 && msg_action != MSG_LOAD)
else if ((pid = fork()) == 0)
{
(void)deliver_message(argv[i], forced_delivery, deliver_give_up);
- exim_underbar_exit(EXIT_SUCCESS);
+ exim_underbar_exit(EXIT_SUCCESS, US"cmdline-delivery");
}
else if (pid < 0)
{
@@ -5710,7 +5714,7 @@ while (more)
rc = deliver_message(message_id, FALSE, FALSE);
search_tidyup();
exim_underbar_exit(!mua_wrapper || rc == DELIVER_MUA_SUCCEEDED
- ? EXIT_SUCCESS : EXIT_FAILURE);
+ ? EXIT_SUCCESS : EXIT_FAILURE, US"cmdline-delivery");
}
if (pid < 0)
diff --git a/src/src/functions.h b/src/src/functions.h
index 851cedd3f..042006f95 100644
--- a/src/src/functions.h
+++ b/src/src/functions.h
@@ -225,7 +225,7 @@ extern const uschar * exim_errstr(int);
extern void exim_exit(int, const uschar *) NORETURN;
extern void exim_nullstd(void);
extern void exim_setugid(uid_t, gid_t, BOOL, uschar *);
-extern void exim_underbar_exit(int);
+extern void exim_underbar_exit(int, const uschar *);
extern void exim_wait_tick(struct timeval *, int);
extern int exp_bool(address_item *addr,
uschar *mtype, uschar *mname, unsigned dgb_opt, uschar *oname, BOOL bvalue,
diff --git a/src/src/queue.c b/src/src/queue.c
index 1b70c02b6..0d5b98ff3 100644
--- a/src/src/queue.c
+++ b/src/src/queue.c
@@ -652,7 +652,7 @@ for (int i = queue_run_in_order ? -1 : 0;
testharness_pause_ms(100);
(void)close(pfd[pipe_read]);
rc = deliver_message(fq->text, force_delivery, FALSE);
- exim_underbar_exit(rc == DELIVER_NOT_ATTEMPTED);
+ exim_underbar_exit(rc == DELIVER_NOT_ATTEMPTED, US"qrun-delivery");
}
if (pid < 0)
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "fork of delivery process from "
diff --git a/src/src/rda.c b/src/src/rda.c
index 574b86cdd..547a8bf3b 100644
--- a/src/src/rda.c
+++ b/src/src/rda.c
@@ -768,7 +768,7 @@ if ((pid = fork()) == 0)
out:
(void)close(fd);
search_tidyup();
- exim_underbar_exit(0);
+ exim_underbar_exit(0, US"rda");
bad:
DEBUG(D_rewrite) debug_printf("rda_interpret: failed write to pipe\n");
diff --git a/src/src/route.c b/src/src/route.c
index 8b43613ce..fd3cb3e64 100644
--- a/src/src/route.c
+++ b/src/src/route.c
@@ -759,9 +759,9 @@ while ((check = string_nextinlist(&listptr, &sep, buffer, sizeof(buffer))))
exim_setugid(uid, gid, TRUE,
string_sprintf("require_files check, file=%s", ss));
if (route_check_access(ss, uid, gid, 4))
- exim_underbar_exit(0);
+ exim_underbar_exit(0, US"route-check-access");
DEBUG(D_route) debug_printf("route_check_access() failed\n");
- exim_underbar_exit(1);
+ exim_underbar_exit(1, US"route-check-access");
}
/* In the parent, wait for the child to finish */
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index 6062e8118..66f752dd4 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -5799,7 +5799,7 @@ while (done <= 0)
}
enq_end(etrn_serialize_key);
- exim_underbar_exit(EXIT_SUCCESS);
+ exim_underbar_exit(EXIT_SUCCESS, US"etrn-serialize-interproc");
}
/* Back in the top level SMTP process. Check that we started a subprocess
diff --git a/src/src/tls.c b/src/src/tls.c
index f95091218..a0cfcbf25 100644
--- a/src/src/tls.c
+++ b/src/src/tls.c
@@ -455,7 +455,7 @@ if (pid == 0)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"tls_require_ciphers invalid: %s", errmsg);
fflush(NULL);
- exim_underbar_exit(0);
+ exim_underbar_exit(0, NULL);
}
do {
diff --git a/src/src/transport.c b/src/src/transport.c
index 90789fd60..3eb1c8097 100644
--- a/src/src/transport.c
+++ b/src/src/transport.c
@@ -1272,7 +1272,7 @@ if ((write_pid = fork()) == 0)
!= sizeof(struct timeval)
)
rc = FALSE; /* compiler quietening */
- exim_underbar_exit(0);
+ exim_underbar_exit(0, US"tpt-filter");
}
save_errno = errno;