From b2b188302a624bb405601a79ca8b8f972c5af47b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Thu, 3 Sep 2026 16:55:55 -0300 Subject: [PATCH] fix(dhcp): protect inherited handles in OMAPI child MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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> --- perl-xCAT/xCAT/DHCP/OmapiRunner.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/DHCP/OmapiRunner.pm b/perl-xCAT/xCAT/DHCP/OmapiRunner.pm index 63c5ea59a..ef47128e0 100644 --- a/perl-xCAT/xCAT/DHCP/OmapiRunner.pm +++ b/perl-xCAT/xCAT/DHCP/OmapiRunner.pm @@ -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 {