summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOliver Tappe2007-05-28 15:26:29 +0200
committerOliver Tappe2007-05-28 15:26:29 +0200
commitd1d4fbb1a95902d3e7b4d34ec77b3aa9dab108af (patch)
tree31634bf81c2cad8834524581cee3c882eb81d766 /lib
parent* fixed incorrect package name for smart on SUSE-10.1_x86_64 (diff)
downloadcore-d1d4fbb1a95902d3e7b4d34ec77b3aa9dab108af.tar.gz
core-d1d4fbb1a95902d3e7b4d34ec77b3aa9dab108af.tar.xz
core-d1d4fbb1a95902d3e7b4d34ec77b3aa9dab108af.zip
* changed slxsystem to ignore SIGPIPE instead of exiting, as this used to cause
problems when smart failed to download a package from a source. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1094 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'lib')
-rw-r--r--lib/OpenSLX/Basics.pm14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/OpenSLX/Basics.pm b/lib/OpenSLX/Basics.pm
index e723c431..937c99c7 100644
--- a/lib/OpenSLX/Basics.pm
+++ b/lib/OpenSLX/Basics.pm
@@ -355,10 +355,16 @@ sub slxsystem
{
vlog 2, _tr("executing: %s", join ' ', @_);
my $res = system(@_);
- if ($res > 0 && $res & 127) {
- # child got killed, so we stop, too
- die _tr("child-process reveived signal '%s', parent stops!", $res & 127);
- exit;
+ if ($res > 0) {
+ # check if child got killed, if so we stop, too (unless the signal is
+ # SIGPIPE, which we ignore in order to loop over failed FTP connections
+ # and the like):
+ my $signalNo = $res & 127;
+ if ($signalNo > 0 && $signalNo != 13) {
+ die _tr("child-process reveived signal '%s', parent stops!",
+ $signalNo);
+ exit;
+ }
}
return $res;
}