I am continuing my wanderings through the guts of signal handling, and wonder if can anyone can help me confirm (or better understand) the end result from userland's point of view.
Signal delivery can be nested/reentrant. Calling raise(3) in a signal handler -- even with the same signal number -- will work as expected (until you blow your stack). What I'm not sure about is when multiple, identical signals arrive *before* the signal handler is invoked. A naive interpretation of sigpending(2) suggests only one of each signal can be pending at a time. However, the kernel could place multiple signal contexts on the stack before invoking any handlers, and then userland will process them in LIFO order. FWIW, I'm looking at 5.1 code, and don't expect much/any of this high level behavior to change with rthreads in 5.2. Thanks. --david