From e960bb491108e2fae89abe462b267c9e27bb5508 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Fri, 3 Jan 1997 07:13:20 +0000 Subject: [PATCH] Unlink LogName before attempting to open it. Since we now have a lovely bug in syslogd which causes it to die after random amounts of time (widely reported), this at least allows the administrator to easily restart it without wondering why it simply exits again each time. --- usr.sbin/syslogd/syslogd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index b90498dcfc1..3792606ff43 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -39,7 +39,7 @@ static const char copyright[] = static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; */ static const char rcsid[] = - "$Id: syslogd.c,v 1.15 1996/11/26 02:35:08 peter Exp $"; + "$Id: syslogd.c,v 1.16 1996/12/10 17:52:23 peter Exp $"; #endif /* not lint */ /* @@ -282,6 +282,7 @@ main(argc, argv) memset(&sunx, 0, sizeof(sunx)); sunx.sun_family = AF_UNIX; (void)strncpy(sunx.sun_path, LogName, sizeof(sunx.sun_path)); + (void)unlink(LogName); funix = socket(AF_UNIX, SOCK_DGRAM, 0); if (funix < 0 || bind(funix, (struct sockaddr *)&sunx, SUN_LEN(&sunx)) < 0 ||