diff options
author | jkh <jkh@FreeBSD.org> | 1997-01-03 07:13:20 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1997-01-03 07:13:20 +0000 |
commit | 45be390ed22f958db94a8b1ad706538e372daa12 (patch) | |
tree | c28820473da05d3ac1265f75950d84d222a6b4d2 /usr.sbin/syslogd | |
parent | f23ad310befa3d5ecbe76a2942433189098c11a2 (diff) | |
download | FreeBSD-src-45be390ed22f958db94a8b1ad706538e372daa12.zip FreeBSD-src-45be390ed22f958db94a8b1ad706538e372daa12.tar.gz |
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.
Diffstat (limited to 'usr.sbin/syslogd')
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index b90498d..3792606 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 || |