Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 30 Jun 2014 00:57:22 +0530
From: Weldon Goree <weldon@...gurwallah.org>
To: musl@...ts.openwall.com
Subject: Re: Is there a "right" way to deal with error.h inclusions?

On 06/30/2014 12:41 AM, Rich Felker wrote:
>>
>> void (*error_print_progname) (void) /* always supplied by the caller */
> 
> What is this one supposed to do?
> 

It's caller-supplied, so whatever the caller wants; the caller assigns
it the address of some function he wrote. Internally, if it's non-null
it suppresses the printing of char *program_name, followed by a colon
and space, before the formatted message.

> 
> Like I said above, I think you misunderstand what "in error" means
> here. And blocking cancellation is simply standard (and necessary)
> practice whenever you'll be calling multiple functions which are
> cancellation points and cancellation midway would be problematic.
> Otherwise a partial but incomplete side effects would be observed on
> cancellation, and without cleanup handlers, memory may leak, etc.

Fair enough; I guess the fact that error_message_count can be
incremented implies that fatal errors aren't what these two functions
are for.

Weldon

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.