From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1621 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Todo for release? Date: Fri, 17 Aug 2012 11:49:01 +0200 Message-ID: <20120817094901.GA16602@port70.net> References: <20120813185329.GA20024@brightrain.aerifal.cx> <20120815040836.GJ27715@brightrain.aerifal.cx> <20120815102029.GL20243@port70.net> <20120815133257.GM20243@port70.net> <20120815143640.GM27715@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="9amGYk9869ThD9tj" X-Trace: ger.gmane.org 1345196958 24989 80.91.229.3 (17 Aug 2012 09:49:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Aug 2012 09:49:18 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1622-gllmg-musl=m.gmane.org@lists.openwall.com Fri Aug 17 11:49:18 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1T2JB7-0001Wg-08 for gllmg-musl@plane.gmane.org; Fri, 17 Aug 2012 11:49:17 +0200 Original-Received: (qmail 24342 invoked by uid 550); 17 Aug 2012 09:49:14 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 24328 invoked from network); 17 Aug 2012 09:49:13 -0000 Content-Disposition: inline In-Reply-To: <20120815143640.GM27715@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1621 Archived-At: --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Rich Felker [2012-08-15 10:36:40 -0400]: > On Wed, Aug 15, 2012 at 03:32:57PM +0200, Szabolcs Nagy wrote: > > it seems warn(0) and err(1,0) segfault > > (they should handle fmt==0 before passing > > it to vfprintf) > > and they do not print the ': ' nor the > > __progname > > Thanks for the report. This should be easy to fix. By the way, is it > worth making these functions take a lock on the file for the whole > operation (to make it atomic)? I'm leaning towards no, since they seem > to only be used in legacy junk that's all single-threaded anyway. i dont mind if the file is not locked although it would not itroduce too much overhead.. the ": " is not fixed, i think that should be added --9amGYk9869ThD9tj Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="err.diff" diff --git a/src/linux/err.c b/src/linux/err.c index c291136..bc8a928 100644 --- a/src/linux/err.c +++ b/src/linux/err.c @@ -3,9 +3,15 @@ #include #include +/* basename(argv[0]) is not printed and stderr is not locked */ + void vwarn(const char *fmt, va_list ap) { - if (fmt) vfprintf(stderr, fmt, ap); + if (fmt) { + vfprintf(stderr, fmt, ap); + fputc(':', stderr); + fputc(' ', stderr); + } perror(""); } --9amGYk9869ThD9tj--