Date: Tue, 10 Jan 2023 11:45:24 -0700 From: Alan Somers <asomers@freebsd.org> To: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: libcasper and async-signal-safety Message-ID: <CAOtMX2jwqZHw-3D6rek5dUrAcM4=45n_=a=LVkahdJsOBz8%2B6A@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Normally when a multithreaded process forks, the child is restricted to only calling async-signal-safe functions until it exec()s.. Otherwise, bad stuff could happen like deadlocks on mutexes that will never be released. The cap_init(3) function, used to create Casper services, forks (and then its child forks again and again and again). But there's nothing in the libcasper_service(3) man page about async-signal-safety. I assume that this is just an oversight. After all, all of the existing programs in the base system that use casper are single-threaded. But it's a limitation that ought to be documented in the cap_init(3) man page, right? Or am I missing something? -Alan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2jwqZHw-3D6rek5dUrAcM4=45n_=a=LVkahdJsOBz8%2B6A>