summaryrefslogtreecommitdiff
path: root/src/src/functions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/src/functions.h')
-rw-r--r--src/src/functions.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/src/functions.h b/src/src/functions.h
index 9e71d0c20..a44e7a873 100644
--- a/src/src/functions.h
+++ b/src/src/functions.h
@@ -1117,13 +1117,31 @@ return NULL;
static inline pid_t
exim_fork(const unsigned char * purpose)
{
-pid_t pid = fork();
-if (pid == 0) process_purpose = purpose;
+pid_t pid;
+DEBUG(D_any) debug_printf("%s forking for %s\n", process_purpose, purpose);
+if ((pid = fork()) == 0)
+ {
+ process_purpose = purpose;
+ DEBUG(D_any) debug_printf("postfork: %s\n", purpose);
+ }
+else
+ {
+ testharness_pause_ms(100); /* let child work */
+ DEBUG(D_any) debug_printf("%s forked for %s: %d\n", process_purpose, purpose, (int)pid);
+ }
return pid;
}
-#define child_open_exim(p, r) child_open_exim_function((p), (r))
-#define child_open_exim2(p, s, a, r) child_open_exim2_function((p), (s), (a), (r))
+
+static inline pid_t
+child_open_exim(int * fdptr, const uschar * purpose)
+{ return child_open_exim_function(fdptr, purpose); }
+
+static inline pid_t
+child_open_exim2(int * fdptr, uschar * sender,
+ uschar * sender_auth, const uschar * purpose)
+{ return child_open_exim2_function(fdptr, sender, sender_auth, purpose); }
+
/******************************************************************************/
#endif /* !MACRO_PREDEF */