Article View: news.software.nntp
Article #40472Re: Diablo debugging problems...
From: Russ Allbery
Date: Mon, 04 Oct 1999 00:00
Date: Mon, 04 Oct 1999 00:00
28 lines
1897 bytes
1897 bytes
Brad Knowles <brad@shub-internet.org> writes:
> However, I'm rather confused by the "...: %m" argument being handed to
> syslog(). It's replicated throughout all syslog calls I can find in
> this code, and yet there doesn't seem to be a corresponding value being
> printed with that "%m" format, nor can I find that format in the man
> page for the printf() family.
It's a special syslog() thing, not a printf() thing, and it doesn't take
an argument:
The message body is generated from the message and following
arguments in the same manner as if these were arguments to
printf(3B), except that occurrences of %m in the format string
pointed to by the message argument are replaced by the error message
string associated with the current value of errno.
Of course, write() didn't return -1 but rather returned a zero or positive
value that was just less than the expected one. Therefore, per the write
API documentation, errno was not set and will contain something random.
In this case it contains 0, which syslog() (probably via strerror())
recognizes as not being an actual error code, producing the "Undefined
error" message.
--
Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
Technical Details
Message-ID:
<yl670ndpwz.fsf@windlord.stanford.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<brad-0110991517500001@brad.techos.skynet.be> <37f4e0b3$0$10188@news.execpc.com> <brad-0410991834410001@brad.techos.skynet.be>Show Full Headers
Complete Article Headers
Message-ID: <yl670ndpwz.fsf@windlord.stanford.edu> Subject: Re: Diablo debugging problems... Date: Mon, 04 Oct 1999 00:00:00 +0000 From: Russ Allbery <rra@stanford.edu> References: <brad-0110991517500001@brad.techos.skynet.be> <37f4e0b3$0$10188@news.execpc.com> <brad-0410991834410001@brad.techos.skynet.be> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 532714702 Organization: The Eyrie Newsgroups: news.software.nntp