Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150307221042.GX23507@brightrain.aerifal.cx>
Date: Sat, 7 Mar 2015 17:10:42 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: Does Musl offer a thread-safe and non-dynamically
 allocating version of strsignal?

On Sat, Mar 07, 2015 at 09:51:24PM +0000, Steven Stewart-Gallus wrote:
> Hello,
> 
> I am currently using Musl Libc to test the portability of some of my
> code and while porting my code over I found a small deficiency.  This
> annoyance is not a big deal as I am not currently using Musl in
> production but I thought I should let you know anyways so that Musl
> can be improved and that other people might benefit.  Currently with
> GLibc I use the deprecated sys_siglist static array of string names
> for signals to get the names of signals (this might actually be the
> signal that a process I am monitoring receives and not just the kind
> the current process's libc knows about) in a thread safe way without
> the complications of dynamic memory allocation.  Obviously, I could
> just use the strsignal function but I do not know if strsignal is
> thread safe or dynamically allocates memory.  Does Musl offer a
> thread-safe and non-dynamically allocating version of strsignal?

Both strsignal and strerror in musl return immutable strings, and are
fully thread-safe.

Rich

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.