Bug#1004988: libbsd0: closefrom() should be async-signal-safe

2024-10-02 Thread Michael Gold
On Fri, Feb 04, 2022 at 23:11:29 +0100, Jakub Wilk wrote: > https://www.sourceware.org/ml/libc-alpha/2018-09/msg00270.html hints that > you can use poll() to query for open fds. That should be efficient, portable > and async-signal-safe. I just saw this report, and happened to have some code to do

Bug#1004988: libbsd0: closefrom() should be async-signal-safe

2022-02-04 Thread Jakub Wilk
Package: libbsd0 Version: 0.11.5-1+b1 closefrom() is documented to be async-signal-safe on FreeBSD: https://www.freebsd.org/cgi/man.cgi?sigaction I'd like it to be async-signal-safe in libbsd too. The current implementation uses opendir()/readdir()/closedir() and reallocarray()/close(), which a