search for: catclose

Displaying 2 results from an estimated 2 matches for "catclose".

2019 Jan 22
2
Re: [nbdkit PATCH 0/3] Fix %m usage on BSD
...s space shared between all threads for returning "Unknown error -1", and which could get corrupted by a parallel thread doing strerror(-2)). But FreeBSD shares static storage for strerror() results among all threads, in part because it computes the resulting string via catopen()/catgets()/catclose() and MUST copy the localized string somewhere because the source read via catgets() may not survive catclose(). So we really need to audit all use of sterror() in nbdkit and switch over to strerror_r(), remembering to work around the alternate glibc signature when _GNU_SOURCE is defined. -- Eri...
2018 Nov 29
6
[nbdkit PATCH 0/3] Fix %m usage on BSD
Our use of "%m" in various error messages is testament to the project's initial life on Linux - but other than Cygwin, I know of no other platforms supporting that glibc extension. We COULD audit the code and manually turn "%m" into "%s"/strerror(errno), but that's a lot of churn. Instead, let's fix the few outliers that can't be easily wrapped, then