Submitted. Still unsure if signal handling is correct.