fix possible fd leak in signpipe