server: Improve signal handling under Linux