add handler for pipe signals, this prevents some crash issues