Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: Restarting a Perl script on Windows 10

by Anonymous Monk
on Sep 24, 2019 at 08:31 UTC ( [id://11106631]=note: print w/replies, xml ) Need Help??


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 ); }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11106631]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-25 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found