G'day jcb,
I'm unsure whether you posted this to corroborate what I said or correct something you believed I had wrong in some way.
So, purely by way of clarification:
-
I was pointing out that the exit in a Tk script was the one described in
https://metacpan.org/pod/distribution/Tk/pod/exit.pod and not the one described in
https://perldoc.perl.org/functions/exit.html.
-
I was not, in any way, suggesting that changing from Tk::exit to CORE::exit
would be beneficial for the OP.
In fact, I wrote: "Knowing that doesn't help the OP ...".
-
What you wrote ("As I understand, the two exit procedures ...") pretty much paraphrases
what's in the Tk::exit documentation; i.e.
"Using exit from a forked process will terminate both the child process and the parent process. As Tk::exit is imported by default one should use CORE::exit in the forked process instead.".
-
The reason to generally prefer Tk::exit over CORE::exit is given in the preceding paragraph:
"If calling exit from code invoked via a Tk callback then this Tk version of exit cleans up more reliably than using the perl exit.".
If there was any miscommunication or misunderstanding, I hope that clears it up.