Improved signal handling for Linux