dagolden / Capture-Tiny

(Perl) Capture STDOUT and STDERR from Perl, XS or external programs
http://search.cpan.org/dist/Capture-Tiny/
39 stars 19 forks source link

Fudge "local $@" to prevent hard crash on forked MSWin32 perl <= 5.20 #31

Closed fecundf closed 8 years ago

fecundf commented 9 years ago

This patch uses lexicals to replace "local $@" statements, which causes MSWin32 perl's <=5.20 to hard crash when forking. There's also a rudimentary test for this case- it still fails, perhaps should be marked as TODO, but no longer fails as a hard crash.

dagolden commented 9 years ago

Thanks for your work on Capture::Tiny. I'm about to leave on vacation for a couple weeks, but look forward to digging into the details when I get back.

xdg commented 8 years ago

I finally figured out why the test was failing. Turns out "die" doesn't use current STDERR, but some cached STDERR. I fixed the test, rebased/squashed and merged it. Thank you for this and I'm sorry it took so long for me to find the time to resolve it.