In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/acffc8af7f7e4e27d4ead35373df7dab0b76c200?hp=860aed1a66433b47c656b10cda8f388ea3b26dcd>
- Log ----------------------------------------------------------------- commit acffc8af7f7e4e27d4ead35373df7dab0b76c200 Author: Father Chrysostomos <spr...@cpan.org> Date: Thu Aug 4 13:17:32 2016 -0700 [perl #126041] Only clear LS_COLORS for glob When miniperl calls csh to implement glob(), we clear %ENV temporarily to avoid csh dying on invalid values for things like LS_COLORS. That has proven to have far too many problems, since many system-dependent env vars are necessary for calling an external process. See the RT ticket for details. A better solution is temporarily to clear only those vars that are known to be problematic and make csh possibly fail. There only hap- pens to be one of those at present, namely LS_COLORS. ----------------------------------------------------------------------- Summary of changes: doio.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/doio.c b/doio.c index 856b19a..2dc7082 100644 --- a/doio.c +++ b/doio.c @@ -2608,14 +2608,11 @@ Perl_vms_start_glob #endif /* !CSH */ #endif /* !DOSISH */ { - GV * const envgv = gv_fetchpvs("ENV", 0, SVt_PVHV); - SV ** const home = hv_fetchs(GvHV(envgv), "HOME", 0); - SV ** const path = hv_fetchs(GvHV(envgv), "PATH", 0); - if (home && *home) SvGETMAGIC(*home); - if (path && *path) SvGETMAGIC(*path); - save_hash(gv_fetchpvs("ENV", 0, SVt_PVHV)); - if (home && *home) SvSETMAGIC(*home); - if (path && *path) SvSETMAGIC(*path); + SV ** const svp = hv_fetchs(GvHVn(PL_envgv), "LS_COLORS", 0); + if (svp && *svp) + save_helem_flags(GvHV(PL_envgv), + newSVpvs_flags("LS_COLORS", SVs_TEMP), svp, + SAVEf_SETMAGIC); } (void)do_open6(PL_last_in_gv, SvPVX_const(tmpcmd), SvCUR(tmpcmd), NULL, NULL, 0); -- Perl5 Master Repository