sort(1) has a semapahore to protect the tmp file list, and it catches numerous signals to trigger tmp cleanup before bailing out. If we receive a signal while tmp_files_sem is held, we can easily deadlock sort(1) as the signal handler tries to take it again.