Skip site navigation (1)Skip section navigation (2)
Date:      03 Jan 1997 14:55:09 +0000
From:      Paul Richards <p.richards@elsevier.co.uk>
To:        "Jordan K. Hubbard" <jkh@freefall.freebsd.org>
Cc:        CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-usrsbin@freefall.freebsd.org
Subject:   Re: cvs commit: src/usr.sbin/syslogd syslogd.c
Message-ID:  <57iv5est9u.fsf@tees.elsevier.co.uk>
In-Reply-To: "Jordan K. Hubbard"'s message of Thu, 2 Jan 1997 23:13:24 -0800 (PST)
References:  <199701030713.XAA04264@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
"Jordan K. Hubbard" <jkh@freefall.freebsd.org> writes:

>   Modified:    usr.sbin/syslogd  syslogd.c
>   Log:
>   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.

Ahhhhhhhh!! This is the very line that I removed in rev 1.6 !!

LogName can be set from the command line, doing an unconditional link
can be *VERY* dangerous if you happen to mis-type it. If syslogd fails
to create the socket for some reason it's much better for the admin
to see that than too let syslogd think it knows what it's doing and
simply unlink LogName.

Why is syslogd simply exiting and why would the unlink() fix this? It
should print an error message if it fails to open the socket so the
administrator should now why it's not restarting up.

Another point is that the conditional unlink() in the die() function
should clean up the socket under most terminal circumstances, if
syslogd is exiting without doing so then it'd be nice to work out how
since that's where the real bug is.

These signals should all unlink LogName when syslogd dies.

        (void)signal(SIGTERM, die);
        (void)signal(SIGINT, Debug ? die : SIG_IGN);
        (void)signal(SIGQUIT, Debug ? die : SIG_IGN);

-- 
  Paul Richards. Originative Solutions Ltd.  (Netcraft Ltd. contractor)
  Elsevier Science TIS online journal project.
  Email: p.richards@elsevier.co.uk
  Phone: 0370 462071 (Mobile), +44 (0)1865 843155



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?57iv5est9u.fsf>