summaryrefslogtreecommitdiffstats
path: root/lib/OpenSLX/Basics.pm
diff options
context:
space:
mode:
authorOliver Tappe2008-05-24 18:22:12 +0200
committerOliver Tappe2008-05-24 18:22:12 +0200
commit0f9f27b3a81076edcfcd7a8637143405f6ada267 (patch)
treee0f632e741b75529b72983b065ac1be4874fd577 /lib/OpenSLX/Basics.pm
parent* minor bugfix (diff)
downloadcore-0f9f27b3a81076edcfcd7a8637143405f6ada267.tar.gz
core-0f9f27b3a81076edcfcd7a8637143405f6ada267.tar.xz
core-0f9f27b3a81076edcfcd7a8637143405f6ada267.zip
* fixed a problem with a failing child process passing the death gate by throwing -
this resulted in the seemingly weirdest behaviour of the config-demuxer (which was actually the child process trying to demux from within the chroot) git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1795 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'lib/OpenSLX/Basics.pm')
-rw-r--r--lib/OpenSLX/Basics.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/OpenSLX/Basics.pm b/lib/OpenSLX/Basics.pm
index 4b40269e..679b9acb 100644
--- a/lib/OpenSLX/Basics.pm
+++ b/lib/OpenSLX/Basics.pm
@@ -326,8 +326,10 @@ sub callInSubprocess
my $pid = fork();
if (!$pid) {
# child -> execute the given function and exit:
- eval { $childFunc->(); 1 }
- or die $@;
+ if (! eval { $childFunc->(); 1 }) {
+ $@ = "*** $@" unless substr( $@, 0, 4) eq '*** ';
+ print STDERR "$@\n";
+ }
exit 0;
}
@@ -803,14 +805,13 @@ sub _doThrowOrWarn
my $type = shift;
my $msg = shift;
- # use '°°°' for warnings and '***' for errors
+ # use '! ' for warnings and '***' for errors
+ $msg =~ s[^(! |\*\*\*) ][]gms;
if ($type eq 'carp' || $type eq 'warn' || $type eq 'cluck') {
- $msg =~ s[^(! |\*\*\*) ][]igms;
- $msg =~ s[^][! ]igms;
+ $msg =~ s[^][! ]gms;
}
else {
- $msg =~ s[^(! |\*\*\*) ][]igms;
- $msg =~ s[^][*** ]igms;
+ $msg =~ s[^][*** ]gms;
}
if ($openslxConfig{'debug-confess'}) {