set all the plugin procress and its children in a seperate process group;send SIGTERM to the process group to effectively abort command
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14553 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
da2a14fa69
commit
9e4fd9ef38
@ -1245,6 +1245,7 @@ sub plugin_command {
|
||||
die;
|
||||
}
|
||||
if ($child == 0) {
|
||||
setpgrp(0,0);
|
||||
if ($parfd) { #If xCAT is doing multiple requests in same communication PID, things would get unfortunate otherwise
|
||||
$parent_fd = $parfd;
|
||||
}
|
||||
@ -1988,7 +1989,7 @@ sub relay_fds { #Relays file descriptors from pipes to children to the SSL socke
|
||||
print "Aborting...";
|
||||
foreach (keys %plugin_children) {
|
||||
print "Sending INT to $_\n";
|
||||
kill 15, $_;
|
||||
kill -15, $_;
|
||||
}
|
||||
foreach my $cin ($fds->handles) {
|
||||
print $cin "die\n";
|
||||
|
Loading…
Reference in New Issue
Block a user