Front page | perl.perl5.porters |
Postings from August 2001
[ID 20010825.002] STDOUT is not flushed before exec().
Thread Next
From:
jms
Date:
August 25, 2001 03:31
Subject:
[ID 20010825.002] STDOUT is not flushed before exec().
Message ID:
200108251030.DAA07474@romana.Tymnet.COM
This is a bug report for perl from jms@romana.tymnet.com,
generated with the help of perlbug 1.33 running under perl v5.6.1.
-----------------------------------------------------------------
[Please enter your report here]
STDOUT does not get flushed on exec() for systems where fflush(NULL)
does not work. Abigail's self-correcting JAPH:
#!/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
Works on Linux, but produces no output on Solaris-8 or FreeBSD-2.2.8.
On those two systems, $|++ is required in the BEGIN block to see
any results.
solaris% grep fflush config*
config.h: * This symbol, if defined, tells that fflush(NULL) does flush
config.h: * the stdio file handles stored in an array and fflush them.
config.h: * Note that if fflushNULL is defined, fflushall will not
config.sh:fflushNULL='undef'
config.sh:fflushall='undef'
STDOUT should get explictly flushed when fflush(NULL) is broken.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl v5.6.1:
Configured by jms at Mon Apr 30 13:16:59 PDT 2001.
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris
uname='sunos romana 5.8 generic sun4u sparc sunw,ultra-5_10 '
config_args='-des'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include -I/opt/local/include -I/opt/gnu/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags='-fno-strict-aliasing -I/usr/local/include -I/opt/local/include -I/opt/gnu/include'
ccversion='', gccversion='2.95.2 19991024 (release)', gccosandvers='solaris2.8'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib '
libpth=/usr/local/lib /opt/local/lib /opt/gnu/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib'
Locally applied patches:
---
@INC for perl v5.6.1:
/usr/local/lib/perl5/5.6.1/sun4-solaris
/usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl
.
---
Environment for perl v5.6.1:
HOME=/home/romana/jms
LANG (unset)
LANGUAGE (unset)
LC_COLLATE=C
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/romana/jms/bin:/home/romana/jms/bin.sunos5:/home/romana/jms/bin.sparc:/usr/openwin/bin:/usr/newsprint/bin:/usr/X11R6/bin:/usr/X11R5/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/proc/bin:/usr/local/bin:/usr/local/etc:/usr/local/admin:/opt/gnu/bin:/usr/local/samba/bin:/usr/tym:/usr/shosts:/www/mybin
PERL_BADLANG (unset)
SHELL=/bin/tcsh
Thread Next
-
[ID 20010825.002] STDOUT is not flushed before exec().
by jms