https://rt.perl.org/rt3//Public/Search/Simple.html?q=DESTROY+Exit -> #30331: system/fork in DESTROY overrides exit code of parent program
Says its a feature, see perlvar#$?
Use local $?; system ... in DESTROY to overcome it
In reply to Re: DESTROY handler changes child exit status? (feature $?)
by Anonymous Monk
in thread DESTROY handler changes child exit status?
by saintmike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |