|go ahead... be a heretic|
Restarting a Perl script on Windows 10by petro4213 (Acolyte)
|on Sep 20, 2019 at 10:06 UTC||Need Help??|
petro4213 has asked for the wisdom of the Perl Monks concerning the following question:
I have a Perl script with a GUI that restarts itself, if I press a button in the GUI. This is done through this simple call in the callback of the button:
exec( $pathToMyself );
This works fine on Windows 7. But on Windows 10, the script ends (and the GUI disappears), but it doesn't restart, unless I go to the command window, which I used to initially call the script, and press the Enter key there.
I don't like this behavior. Can anyone explain, where this comes from or give me a hint, if there's something I can do from the Perl side to restart my script without having to press Enter?
Thanks a lot!
Here's a simple reproducible example: