NetBSD-Bugs archive

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

Re: kern/56979: fork(2) fails to be signal safe



    Date:        Sat, 15 Oct 2022 22:46:52 -0400
    From:        Tom Lane <tgl%sss.pgh.pa.us@localhost>
    Message-ID:  <1628442.1665888412%sss.pgh.pa.us@localhost>

  | Well, here is the actual problem: with this implementation, the mere
  | act of invoking a C function is not guaranteed to be async-signal-safe,
  | depending on whether it crosses a not-terribly-well-defined linkage
  | boundary.

For that I'd agree, it should be possible to call any async signal safe
function from within a signal handler, regardless of where the signal
occurs, and if that isn't working for us, we should fix that.

But the stack trace that Taylor showed in his message had the signal handler
calling dlopen() - that's linking to a whole new library (loading a new
external file).   That is certainly not async signal safe.

kre



Home | Main Index | Thread Index | Old Index