develooper Front page | perl.perl5.porters | Postings from July 2005

[perl #36665] delete $ENV{FOO} leaves $FOO visible in subprocesses on Cygwin Perl

Thread Previous
Andrew Ho
July 27, 2005 04:09
[perl #36665] delete $ENV{FOO} leaves $FOO visible in subprocesses on Cygwin Perl
Message ID:
# New Ticket Created by  Andrew Ho 
# Please include the string:  [perl #36665]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
generated with the help of perlbug 1.35 running under perl v5.8.7.

[Please enter your report here]

For at least Perl 5.8.7 on Cygwin, delete()ing an environment variable
does not apparently remove that variable from the environment of a
subprocess. Here is a short repro case:

     use strict;
     use warnings;

     $ENV{SHOULD_NEVER_BE_SEEN} = "hello world";
     system("printenv | grep SHOULD_NEVER_BE_SEEN");

On Unix systems this script appropriately prints nothing.
On an up to date Cygwin installation this prints "hello world".

This bug manifested itself as a problem with Test::Harness on Cygwin
Perl. For context, see the e-mail thread around this summary message:

[Please do not change anything below this line]
Site configuration information for perl v5.8.7:

Configured by gerrit at Fri Jul  8 20:35:50     2005.

Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
     osname=cygwin, osvers=1.5.18(0.13242), archname=cygwin-thread-multi-64int
     uname='cygwin_nt-5.1 inspiron 1.5.18(0.13242) 2005-07-02 20:30 i686 unknown unknown cygwin '
     config_args='-de -Dmksymlinks -Duse64bitint -Dusethreads -Doptimize=-O3 -Dman3ext=3pm -Dusesitecustomize'
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
     useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
     use64bitint=define use64bitall=undef uselongdouble=undef
     usemymalloc=y, bincompat5005=undef
     cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr/local/include',
     cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr/local/include'
     ccversion='', gccversion='3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
     ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
     alignbytes=8, prototype=define
   Linker and Libraries:
     ld='ld2', ldflags =' -s -L/usr/local/lib'
     libpth=/usr/local/lib /usr/lib /lib
     libs=-lgdbm -ldb -lcrypt -lgdbm_compat
     perllibs=-lcrypt -lgdbm_compat
     libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s'
     cccdlflags=' ', lddlflags=' -s -L/usr/local/lib'

Locally applied patches:

@INC for perl v5.8.7:

Environment for perl v5.8.7:
     HOME=/cygdrive/c/Documents and Settings/andrew/home
     LANG (unset)
     LANGUAGE (unset)
     LD_LIBRARY_PATH (unset)
     LOGDIR (unset)
     PATH=/cygdrive/c/Documents and Settings/andrew/home/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/system32
     PERL_BADLANG (unset)
     SHELL (unset)

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About