New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On Win32 setting any encoding on STD(IN|OUT|ERR) with binmode causes subsequent fork calls to crash perl #11274
Comments
From @wchristianCreated by @wchristianThis piece of code crashes when it reaches the fork call and never reaches the print statement: perl -e "binmode STDOUT, ':encoding(greek)'; fork; print 1;" Instead of STDOUT, these can also be used and will cause the crash too: STDIN, STDERR. Instead of greek, any other encoding can be used as well and will also cause the crash. Perl Info
|
From @kmxjust adding cross reference to related RT http://rt.perl.org/rt3/Ticket/Display.html?id=85366 |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Sat, Apr 23, 2011 at 03:12:17AM -0700, Christian Walde wrote:
Just to note, that since this is using the ithreads pseudo-fork on win32, $ ./perl -Ilib -e "use threads; binmode STDOUT, ':encoding(greek)'; async { print 1} print 1" -- |
From @nwc10On Tue, May 17, 2011 at 10:10:42AM +0100, Dave Mitchell wrote:
And I think it's a "hard" problem to solve, because the PerlIO system wants to perl_clone_using() has this: #ifdef PERLIO_LAYERS which makes sense. However, PerlIO also wants to provide fully perl-space Gah! This isn't thought through. I think a solution might be to change things so that: a: all IO continues to be in parent interpreter for the duration of cloning b is easy. a probably is not. I'm not even sure if it can be done without Nicholas Clark |
From @dcollinsnThis is fixed in 5.24.0: dcollins@nightshade64:~$ perl5.22.0-thread-multi -wle "use threads; binmode STDOUT, ':encoding(greek)'; async { print 1} print 1" Bisect says it was fixed by: 0ee3fa2 is the first new commit Properly duplicate PerlIO::encoding objects PerlIO::encoding objects are usually initialized by calling Perl methods, The proper way to duplicate the PerlIO::encoding object is to call sv_dup() This fixes [RT #31923]. :100644 100644 f79df008098f4df1f97f7f104171b89c31049a90 34c2e2436a2a14e776725ca5c40a74c8f0a4bdb7 M MANIFEST I'm marking this resolved. -- |
@dcollinsn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#89142 (status was 'resolved')
Searchable as RT89142$
The text was updated successfully, but these errors were encountered: