aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmail-remote/qmail-remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmail-remote/qmail-remote.c')
-rw-r--r--src/qmail-remote/qmail-remote.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qmail-remote/qmail-remote.c b/src/qmail-remote/qmail-remote.c
index a9fdd13..7c7f5f7 100644
--- a/src/qmail-remote/qmail-remote.c
+++ b/src/qmail-remote/qmail-remote.c
@@ -20,6 +20,9 @@
#include <skalibs/socket.h>
#include <skalibs/ip46.h>
#include <skalibs/unix-timed.h>
+#ifdef DEBUG
+# include <skalibs/prog.h>
+#endif
#include <s6-networking/config.h>
#include <smtpd-starttls-proxy/config.h>
@@ -201,6 +204,12 @@ int main (int argc, char const *const *argv)
uint16_t port = 25 ;
int r ;
+#ifdef DEBUG
+ char progstr[18 + PID_FMT] = "qmail-remote: pid " ;
+ progstr[18 + pid_fmt(progstr + 18, getpid())] = 0 ;
+ PROG = progstr ;
+#endif
+
if (argc-- < 4) dieusage() ;
argv++ ;
if (chdir(SMTPD_STARTTLS_PROXY_QMAIL_HOME) == -1) qmailr_tempusys("chdir to ", SMTPD_STARTTLS_PROXY_QMAIL_HOME) ;