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

Re: metaconfig tweak? (was Re: [perl #7586] STDOUT is not flushedbefore exec().)

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
September 16, 2013 10:27
Subject:
Re: metaconfig tweak? (was Re: [perl #7586] STDOUT is not flushedbefore exec().)
Message ID:
20130916122745.2b642a07@pc09.procura.nl
On Mon, 16 Sep 2013 11:20:24 +0100, Nicholas Clark <nick@ccl4.org>
wrote:

> On Mon, Sep 16, 2013 at 10:09:02AM +0100, Nicholas Clark wrote:
> 
> > It turns out* that $Config{fflushNULL} on HP-UX is *STILL* undef, because
> > fflush(NULL) wrongly closes STDIN if STDIN is a pipe (which is what the
> > Configure test probes for).
> 
> Is it worth documenting the specific failure case more clearly? Something
> like this?

YES!

Do you want to commit that yourself?
Follow-up steps are to regenerate the files in the perl repo and
Porting/glossary. Not too much work once you know the tantra. I can do
that now if you want

> diff --git a/U/perl/fflushall.U b/U/perl/fflushall.U
> index 783a7f7..a4398dd 100644
> --- a/U/perl/fflushall.U
> +++ b/U/perl/fflushall.U
> @@ -13,8 +13,9 @@
>  	d_sysconf i_unistd d_stdio_stream_array stdio_stream_array i_stdlib
>  ?MAKE:	-pick add $@ %<
>  ?S:fflushNULL:
> -?S:	This symbol, if defined, tells that fflush(NULL) does flush
> -?S:	all pending stdio output.
> +?S:	This symbol, if defined, tells that fflush(NULL) correctly flushes
> +?S:	all pending stdio output without side effects. In particular, on some
> +?S:	platforms calling fflush(NULL) *still* corrupts STDIN if it is a pipe.
>  ?S:.
>  ?S:fflushall:
>  ?S:	This symbol, if defined, tells that to flush
> @@ -24,8 +25,9 @@
>  ?S:	even be probed for and will be left undefined.
>  ?S:.
>  ?C:FFLUSH_NULL:
> -?C:	This symbol, if defined, tells that fflush(NULL) does flush
> -?C:	all pending stdio output.
> +?C:	This symbol, if defined, tells that fflush(NULL) correctly flushes
> +?C:	all pending stdio output without side effects. In particular, on some
> +?C:	platforms calling fflush(NULL) *still* corrupts STDIN if it is a pipe.
>  ?C:.
>  ?C:FFLUSH_ALL:
>  ?C:	This symbol, if defined, tells that to flush
> 
> Nicholas Clark


-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.19   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

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