sigaction itself is atomic.
It would be messy to write a userspace function that searches for a "free"
signal, replaces it with its own handler and replaces it back again when
the old handler has been changed. You would need to make sure, of course,
that any signals having been delivered in the meantime would get routed to
the old signal handler, but maybe you can just block them shortly.
Messy, but should work, no?
-- -----==- | ----==-- _ | ---==---(_)__ __ ____ __ Marc Lehmann +-- --==---/ / _ \/ // /\ \/ / pcg@goof.com |e| -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+ The choice of a GNU generation | |- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/