develooper Front page | perl.perl5.porters | Postings from August 2016

[perl #128995] Environment variables are not always propagated tosub-process

Thread Next
From:
Cherio
Date:
August 20, 2016 03:25
Subject:
[perl #128995] Environment variables are not always propagated tosub-process
Message ID:
rt-4.0.24-1317-1471630443-983.128995-75-0@perl.org
# New Ticket Created by  Cherio 
# Please include the string:  [perl #128995]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=128995 >


Environment variables with '.' (dot character) are not always passed to the
child process.
In the following example 'test.variable' will ne be available to the child
process when it starts:

$ENV{'test.variable'} = 'Hello kitty';
system("'/bin/program' 'arg1' 'arg2'");

However a slightly modified version of the same code works and
'test.variable' is available in the child program

$ENV{'test.variable'} = 'Hello kitty';
system('/bin/program', 'arg1', 'arg2');

This is a regression. It worked both ways in Perl 5.18

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