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
fork during parsing exhausts parsing file #9811
Comments
From perlbug@plan9.deCreated by perlbug@plan9.deThis program prints "here" only once, when one would naively expect it to BEGIN { fork } I guess this is because the parser exhausts the file, so the next run will I think this should either be fixed, or the parse file handle be made Perl Info
|
From @rgs2009/8/2 perlbug@plan9.de (via RT) <perlbug-followup@perl.org>:
Note that a simple workaround to this behaviour is to use __DATA__ and seek DATA,0,0; |
The RT System itself - Status changed from 'new' to 'open' |
From schmorp@schmorp.deOn Thu, Aug 06, 2009 at 04:57:51PM +0200, Rafael Garcia-Suarez <rgarciasuarez@gmail.com> wrote:
Just stumbled over your reply by accident (you didn't send it to me, of Please note that your example does not work, because DATA is not available The workaround I use in Anyevent::Watchdog is this, which is of coruse rather Before fork: our %SEEKPOS; # this causes perlio to flush it's handles internally, so # now records all fd positions After each fork: # restore seek offsets The code is so ugly because there is no way to access the file handles in Since it seems to work, I am fine with that as long as I do not have to -- |
From @rgs2009/8/26 Marc Lehmann <schmorp@schmorp.de>:
No. Your mail address wasn't in the From or in the Reply-To headers.
Yes. That was a specific workaround for simple cases.
I agree. I think that IlyaZ encountered the same problem some years |
From schmorp@schmorp.deOn Wed, Aug 26, 2009 at 11:06:55AM +0200, Rafael Garcia-Suarez <rgarciasuarez@gmail.com> wrote:
Oh right, rt.cpan.org has this annoying habit of remoivng e-mail addresses.
I don't know - normally I receive replies to perlbug-reports. Not a big
Well, I can live with havign to do some extra work - the problem isn't But as it seems to work, I can live with it for the time being. (Maybe it should just be documented - that fork doesn't work in BEGIN -- |
Migrated from rt.perl.org#68118 (status was 'open')
Searchable as RT68118$
The text was updated successfully, but these errors were encountered: