better signal handling on *nix