tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pthread_setname_np API is bad



On 09.08.2019 16:03, Martin Husemann wrote:
> On Fri, Aug 09, 2019 at 04:00:02PM +0200, Kamil Rytarowski wrote:
>> On 09.08.2019 15:32, Christos Zoulas wrote:
>>> My worry is that someone will call pthread_setname_np() with a
>>>  "%thread%s" name argument and get a core dump on a NetBSD system since
>>> the string will be interpreted as a format (where in other OS's it will
>>> be taken literally and work.
>>>
>>
>> This will be caught by a compiler with __printflike() attribute.
> 
> So in response to an incompatible API complaint, we change it to another
> incompatible API?
> 
> Martin
> 

My proposal was to keep more or less API compatible one with the current
NetBSD variation but just improve the function prototype.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index