Call only signal-safe functions (#3).

This is a work-in-progress.

Apparently pthread_create() is not a safe function to call from the signal handler (whoops). I think that this design is safer, but does result in an extra thread and two extra FDs hanging around at all times.