On 11/01/13 20:55, Guenther Niess wrote:
>> Synopsis:      smtpd exits right after starting the daemon
>> Category:      armv7
>> Environment:
>         System      : OpenBSD 5.4
>         Details     : OpenBSD 5.4-current (GENERIC-OMAP) #0: Thu Oct 31
> 21:40:54 CET 2013
> 
> [email protected]:/usr/src/sys/arch/armv7/compile/GENERIC-OMAP
> 
>         Architecture: OpenBSD.armv7
>         Machine     : armv7
>> Description:
>         Without the -d "do not daemonize" option smtpd exits after
>         starting.

A patch from gilles@
<http://marc.info/?l=openbsd-cvs&m=139548131515377&w=2>
fixed the problem. The patch now lives in my stable brach OPENBSD_5_5 as
an reliability fix for armv7.

Thanks a lot gilles!

Guenther

Index: usr.sbin/smtpd/config.c
===================================================================
RCS file: /cvs/src/usr.sbin/smtpd/config.c,v
retrieving revision 1.24
diff -u -p -r1.24 config.c
--- usr.sbin/smtpd/config.c     4 Feb 2014 13:44:41 -0000       1.24
+++ usr.sbin/smtpd/config.c     24 Apr 2014 08:04:33 -0000
@@ -35,6 +35,8 @@
 #include "log.h"
 #include "ssl.h"

+extern int profiling;
+
 static int pipes[PROC_COUNT][PROC_COUNT];

 void
@@ -170,6 +172,9 @@ config_done(void)
        }

        if (smtpd_process == PROC_CONTROL)
+               return;
+
+       if (!(profiling & PROFILE_BUFFERS))
                return;

        evtimer_set(&ev, process_stat_event, &ev);
Index: usr.sbin/smtpd/smtpd.c
===================================================================
RCS file: /cvs/src/usr.sbin/smtpd/smtpd.c,v
retrieving revision 1.213
diff -u -p -r1.213 smtpd.c
--- usr.sbin/smtpd/smtpd.c      17 Feb 2014 13:33:56 -0000      1.213
+++ usr.sbin/smtpd/smtpd.c      24 Apr 2014 08:04:33 -0000
@@ -564,6 +564,8 @@ main(int argc, char *argv[])
                                profiling |= PROFILE_IMSG;
                        else if (!strcmp(optarg, "profile-queue"))
                                profiling |= PROFILE_QUEUE;
+                       else if (!strcmp(optarg, "profile-buffers"))
+                               profiling |= PROFILE_BUFFERS;
                        else
                                log_warnx("warn: unknown trace flag \"%s\"",
                                    optarg);
Index: usr.sbin/smtpd/smtpd.h
===================================================================
RCS file: /cvs/src/usr.sbin/smtpd/smtpd.h,v
retrieving revision 1.450
diff -u -p -r1.450 smtpd.h
--- usr.sbin/smtpd/smtpd.h      17 Feb 2014 13:33:56 -0000      1.450
+++ usr.sbin/smtpd/smtpd.h      24 Apr 2014 08:04:33 -0000
@@ -592,6 +592,7 @@ struct smtpd {
 #define PROFILE_TOSTAT 0x0001
 #define PROFILE_IMSG   0x0002
 #define PROFILE_QUEUE  0x0004
+#define PROFILE_BUFFERS        0x0008

 struct forward_req {
        uint64_t                        id;

Reply via email to