突然,无法备份一台服务器。我收到一条奇怪的错误消息:
2011-01-04 10:10:37 host1: Can't fork at /usr/share/backuppc/lib/BackupPC/Lib.pm line 1128.
这个错误是什么意思?
所有其他主机(具有相同操作系统)都没有此问题。
预先感谢您的回复。 :)
$cmd = [split(/\s+/, $cmd)] if ( ref($cmd) ne "ARRAY" );
print(STDERR "cmdSystemOrEval: about to system ",
$bpc->execCmd2ShellCmd(@$cmd), "\n")
if ( $bpc->{verbose} );
if ( !defined($pid = open(CHILD, "-|")) ) { # <<<<<<<<< 1128
my $err = "Can't fork to run @$cmd\n";
$? = 1;
$$stdoutCB .= $err if ( ref($stdoutCB) eq 'SCALAR' );
&$stdoutCB($err) if ( ref($stdoutCB) eq 'CODE' );
return $err if ( !defined($stdoutCB) );
return;
}
binmode(CHILD);
if ( !$pid ) {
#
# This is the child
#
close(STDERR);
if ( $ignoreStderr ) {
open(STDERR, ">", "/dev/null");
} else {
open(STDERR, ">&STDOUT");
}
alarm(0);
$cmd = [map { m/(.*)/ } @$cmd]; # untaint
#
# force list-form of exec(), ie: no shell even for 1 arg
#
exec { $cmd->[0] } @$cmd;
print(STDERR "Exec of @$cmd failed\n");
exit(1);
}