From owner-freebsd-questions@FreeBSD.ORG Wed Apr 9 09:14:10 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B166037B401 for ; Wed, 9 Apr 2003 09:14:10 -0700 (PDT) Received: from mired.org (ip68-97-54-220.ok.ok.cox.net [68.97.54.220]) by mx1.FreeBSD.org (Postfix) with SMTP id 6D02143F75 for ; Wed, 9 Apr 2003 09:14:09 -0700 (PDT) (envelope-from mwm-dated-1050336848.0c448f@mired.org) Received: (qmail 44665 invoked from network); 9 Apr 2003 16:14:08 -0000 Received: from localhost.mired.org (HELO guru.mired.org) (127.0.0.1) by localhost.mired.org with SMTP; 9 Apr 2003 16:14:08 -0000 Received: by guru.mired.org (tmda-inject, from uid 100); Wed, 09 Apr 2003 11:14:08 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16020.18128.304955.796904@guru.mired.org> Date: Wed, 9 Apr 2003 11:14:08 -0500 To: Christopher Nehren In-Reply-To: <1049840007.685.79.camel@prophecy.dyndns.org> References: <1049840007.685.79.camel@prophecy.dyndns.org> X-Mailer: VM 7.07 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ From: Mike Meyer X-Delivery-Agent: TMDA/0.73 (Jet Pilot) cc: freebsd-questions@freebsd.org Subject: Re: Return values of the syslog(3) family X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2003 16:14:11 -0000 In <1049840007.685.79.camel@prophecy.dyndns.org>, Christopher Nehren typed: > I've looked at the prototypes of various BSD and Linux systems' > syslog(3) calls, and they all have 'void' as the return type. Now, > logically, since a log file is being written, wouldn't it be nice to > know whether that call executed successfully? Yes, I've already thought > of the "If you can't write to syslog, then you have larger problems than > this" ... but how would one -know- they have these problems? I admit > that I'm probably missing something about the Nature of Programming; but > at least to this newbie, it seems like it defeats part of the point of > calling the functions in the first place. TIA for any information about > this. Just out of curiosity, exactly what do you expect a program that has just found out that it's logging facility to do? You obviously can't log the fact - though I've seen systems that tried. You don't want to exit without notifying someone of the fact, and the facility you'd most likely use to do that is no longer functioning. You might quit logging and queue the messages to log later, but then you'd have to try logging the first one and see if it works. Besides, that would put false timestamps on each message. If many daemons did this, you'd risk running the system out of virtual, which is a bad idea. All in all, I'd say the best thing to do after a failing syslog is ignore it. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.