From: bluhm Date: Fri, 12 Jun 2015 00:54:28 +0000 (+0000) Subject: If fork fails, print an error message before exit. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b378d381319b0e69adfed9cdaa3d97efaa50ed1b;p=openbsd If fork fails, print an error message before exit. OK doug@ djm@ --- diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 9d65df759e6..0ed55138e98 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syslogd.c,v 1.161 2015/03/30 09:21:42 tobias Exp $ */ +/* $OpenBSD: syslogd.c,v 1.162 2015/06/12 00:54:28 bluhm Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -564,7 +564,7 @@ main(int argc, char *argv[]) switch(fork()) { case -1: - exit(1); + err(1, "fork"); case 0: setsid(); close(lockpipe[0]);