aboutsummaryrefslogtreecommitdiff
path: root/tgserver
diff options
context:
space:
mode:
authorGuillermo Ramos2020-02-28 10:21:08 +0100
committerGuillermo Ramos2020-02-28 10:21:08 +0100
commitc109882cf3d666678f5091e3624f5dc9520682f9 (patch)
treec6bb4cf507b63cb33d66f9f8462fd5dfc40737db /tgserver
parent0817cf1c12f8ad49435fa6cbc85fe76028a92325 (diff)
downloadtgutils-c109882cf3d666678f5091e3624f5dc9520682f9.tar.gz
Handle SIGPIPES
Diffstat (limited to 'tgserver')
-rwxr-xr-xtgserver4
1 files changed, 4 insertions, 0 deletions
diff --git a/tgserver b/tgserver
index 9511b94..b281e40 100755
--- a/tgserver
+++ b/tgserver
@@ -116,6 +116,10 @@ sub reply {
sub pipe_send {
my ($content, @cmd) = @_;
+ $SIG{PIPE} = sub {
+ $logger->debug("SIGPIPE received (@_), ignoring\n");
+ };
+
use IPC::Open2 qw<open2>;
my $pid = open2(my $progr, my $progw, @cmd);