mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 09:13:08 +00:00
Become process group leader when updating firmware
As exec is invoked, child process can not ignore the signal sent to the process group, use setpgrp to set the pgid to itself. close-issue: #1849
This commit is contained in:
parent
f50d14e483
commit
7c5ef74565
@ -1924,6 +1924,11 @@ sub do_rflash_process {
|
||||
|
||||
# child
|
||||
elsif ($pid == 0) {
|
||||
unless (setpgrp()) {
|
||||
xCAT::SvrUtils::sendmsg([ 1, "Faild to run setgprp for $$ process" ],
|
||||
$callback, $node);
|
||||
exit(1);
|
||||
}
|
||||
my $extra = $_[8];
|
||||
my @exargs = @$extra;
|
||||
my $programe = \$0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user