--- a/src/utils/execmd.cpp
+++ b/src/utils/execmd.cpp
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "@(#$Id: execmd.cpp,v 1.19 2006-10-11 16:09:45 dockes Exp $ (C) 2004 J.F.Dockes";
+static char rcsid[] = "@(#$Id: execmd.cpp,v 1.20 2006-11-30 13:38:44 dockes Exp $ (C) 2004 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@@ -126,6 +126,9 @@
}
if (e.pid) {
+ // Ignore SIGPIPE in here.
+ void (*osig)(int);
+ osig = signal(SIGPIPE, SIG_IGN);
// Father process
if (input) {
close(e.pipein[0]);
@@ -219,6 +222,7 @@
out:
int status = -1;
+ signal(SIGPIPE, osig);
if (!m_cancelRequest) {
(void)waitpid(e.pid, &status, 0);
e.pid = -1;