diff options
author | Bob Beck <beck@cvs.openbsd.org> | 1998-02-07 21:29:41 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 1998-02-07 21:29:41 +0000 |
commit | 5aec01b68a9faafbcac77112a031cdb382967734 (patch) | |
tree | 4e5ed25453810d7578ef295d236669db2a588305 /libexec | |
parent | 2ead72e0fcd99311e0e36f9889750dff9ccde50f (diff) |
let's exit from the right process when running standalone.
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/smtpd/src/smtpd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libexec/smtpd/src/smtpd.c b/libexec/smtpd/src/smtpd.c index f4b87cea5f1..f694032fb2c 100644 --- a/libexec/smtpd/src/smtpd.c +++ b/libexec/smtpd/src/smtpd.c @@ -2,7 +2,7 @@ * smtpd, Obtuse SMTP daemon, storing agent. does simple collection of * mail messages, for later forwarding by smtpfwdd. * - * $Id: smtpd.c,v 1.3 1998/01/14 08:20:22 beck Exp $ + * $Id: smtpd.c,v 1.4 1998/02/07 21:29:40 beck Exp $ * * Copyright (c) 1996, 1997 Obtuse Systems Corporation. All rights * reserved. @@ -40,7 +40,7 @@ char *obtuse_copyright = "Copyright 1996 - Obtuse Systems Corporation - All rights reserved."; -char *obtuse_rcsid = "$Id: smtpd.c,v 1.3 1998/01/14 08:20:22 beck Exp $"; +char *obtuse_rcsid = "$Id: smtpd.c,v 1.4 1998/02/07 21:29:40 beck Exp $"; #include <stdarg.h> #include <stdlib.h> @@ -2342,7 +2342,7 @@ main(int argc, char **argv) failures = 0; rval = fork(); - if ( rval == 0 ) { + if ( rval > 0 ) { /* * Parent - close the accepted fd and continue the loop @@ -2350,7 +2350,7 @@ main(int argc, char **argv) close(fd); - } else if ( rval > 0 ) { + } else if ( rval == 0 ) { /* * Child - make ourselves look like an inetd child |