From b378d381319b0e69adfed9cdaa3d97efaa50ed1b Mon Sep 17 00:00:00 2001 From: bluhm Date: Fri, 12 Jun 2015 00:54:28 +0000 Subject: [PATCH] If fork fails, print an error message before exit. OK doug@ djm@ --- usr.sbin/syslogd/syslogd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]); -- 2.20.1