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

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

Thread Previous | Thread Next
Abhijit Menon-Sen
September 17, 2001 14:16
Re: [ID 20010825.002] STDOUT is not flushed before exec().
Message ID:
At 2001-08-25 03:30:21, 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About