Unlink all log sockets at startup.

PR:		misc/34839
Reviewed by:	ru
Approved by:	ru
Obtained from:	OpenBSD
MFC after:	2 weeks
This commit is contained in:
Maxim Konovalov 2002-02-13 08:37:55 +00:00
parent d60b85c4d7
commit 191c304372

View File

@ -444,6 +444,7 @@ main(argc, argv)
#define SUN_LEN(unp) (strlen((unp)->sun_path) + 2)
#endif
for (i = 0; i < nfunix; i++) {
(void)unlink(funixn[i]);
memset(&sunx, 0, sizeof(sunx));
sunx.sun_family = AF_UNIX;
(void)strlcpy(sunx.sun_path, funixn[i], sizeof(sunx.sun_path));