develooper Front page | perl.perl5.porters | Postings from September 2001

Re: [ID 20010825.002] STDOUT is not flushed before exec().

Thread Previous | Thread Next
From:
Abhijit Menon-Sen
Date:
September 17, 2001 14:16
Subject:
Re: [ID 20010825.002] STDOUT is not flushed before exec().
Message ID:
20010918024645.F7058@lustre.dyn.wiw.org
At 2001-08-25 03:30:21, jms@tardis.tymnet.com wrote:
> 
> #!/usr/local/bin/perl   --   # Remove trailing newline!
> BEGIN{SIG{__WARN__}=sub{$_=pop;y-_- -;print/".*(.)"/;
> truncate$0,-1+-s$0;exec$0;}}//rekcaH_lreP_rehtona_tsuJ

I couldn't get this code to run anywhere, so I haven't been able to
investigate your report properly, but...

> STDOUT should get explictly flushed when fflush(NULL) is broken.

util.c:Perl_my_fflush_all() should take care of this, and it is called,
via PERL_FLUSHALL_FOR_CHILD, in all the obvious places. Does that fail
to work correctly on your system, or is not called at all?

- ams

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About