From 923bf2b9921f06aad2db87ee6fdf5b4711f1dd37 Mon Sep 17 00:00:00 2001 From: Shoichi Kaji Date: Mon, 29 Apr 2024 06:14:14 +0900 Subject: [PATCH] simply call Socket::inet_aton before fork(2) (#248) --- lib/App/cpm/CLI.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/App/cpm/CLI.pm b/lib/App/cpm/CLI.pm index a3e86ba..474ab19 100644 --- a/lib/App/cpm/CLI.pm +++ b/lib/App/cpm/CLI.pm @@ -370,10 +370,8 @@ sub install { && !exists $ENV{OBJC_DISABLE_INITIALIZE_FORK_SAFETY} && !$self->{_darwin_fixed} ) { - my $lib = "/System/Library/Frameworks/Foundation.framework/Foundation"; - $master->{logger}->log("dlopen $lib to initialize Objective-C APIs before fork(2)"); - require DynaLoader; - DynaLoader::dl_load_file $lib; + require Socket; + Socket::inet_aton("call-inet_aton-before_fork"); $self->{_darwin_fixed} = 1; }