in reply to Re^3: Restarting a Perl script on Windows 10
in thread Restarting a Perl script on Windows 10

execW doesnt exit? What if you call exit afterwards? Does the program memory increase?
  • Comment on Re^4: Restarting a Perl script on Windows 10

Replies are listed 'Best First'.
Re^5: Restarting a Perl script on Windows 10
by Anonymous Monk on Sep 24, 2019 at 22:15 UTC

    Ok here is a patch for Win32::Unicode::Process

    sub execW { my $pi = Win32::Unicode::Process::_create_process(@_) or return 1; close_handle($pi->{thread_handle}); close_handle($pi->{process_handle}); exit 0; ## the end } sub _create_process { @_ or return; use Win32::ShellQuote(); my( $program ) = @_; my $commandline = utf8_to_utf16( Win32::ShellQuote::quote_system_s +tring( @_ ) ).NULL; return create_process( $program, $commandline ); }