Do not use _GNU_SOURCE and fix signal handling.