Sets the fd to be written to (with the signal number) when a signal comes in. A library can use this to wakeup select or poll. The previous fd or -1 is returned. The fd must be non-blocking.
signal/set_wakeup_fd
set_wakeup_fd