mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-04 20:17:55 +00:00
fix(dhcp): protect inherited handles in OMAPI child
Use xCAT::Utils->xfork so child-side setup or exec failures do not destroy database handles inherited from the caller. Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,7 @@ use warnings;
|
||||
use File::Temp qw(tempfile);
|
||||
use POSIX qw(WNOHANG);
|
||||
use Time::HiRes qw(sleep);
|
||||
use xCAT::Utils;
|
||||
|
||||
sub open_command_file {
|
||||
my ($class, $directory) = @_;
|
||||
@@ -51,7 +52,7 @@ sub run_command_file {
|
||||
}
|
||||
|
||||
sub _fork {
|
||||
return fork();
|
||||
return xCAT::Utils->xfork();
|
||||
}
|
||||
|
||||
sub _completion_attempts {
|
||||
|
||||
Reference in New Issue
Block a user