mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
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.
This commit is contained in:
parent
a686b628ba
commit
e960bb4911
1 changed files with 2 additions and 1 deletions
|
|
@ -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 ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue