only catch signals on linux (fixes #7908)