[erlang-questions] os:getenv regression

Raimo Niskanen raimo+erlang-questions@REDACTED
Thu Sep 6 15:12:23 CEST 2018


My mail client does not like your mail client.
I think the list policies say something about not HTML-only posts...

On Thu, Sep 06, 2018 at 05:20:10AM -0700, Richard Bowker wrote:
> <DIV style="font-family:Arial, sans-serif; font-size:10pt;"><FONT size="2" style=""><FONT face="Arial, sans-serif">In OTP-20 os:getenv accepted either strings or binaries:</FONT><BR><BR><DIV style=""><FONT face="Arial, sans-serif">Erlang/OTP 20 [erts-9.3.3] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:10] [hipe] [kernel-poll:false]</FONT></DIV><DIV style=""><FONT face="Arial, sans-serif"><BR></FONT></DIV><DIV style=""><FONT face="Arial, sans-serif">Eshell V9.3.3  (abort with ^G)</FONT></DIV><DIV style=""><FONT face="Arial, sans-serif">1> os:getenv("").</FONT></DIV><DIV style=""><FONT face="Arial, sans-serif">false</FONT></DIV><DIV style=""><FONT face="Arial, sans-serif">2> os:getenv(<<"">>).</FONT></DIV><DIV style=""><FONT face="Arial, sans-serif">false</FONT></DIV><DIV style=""><FONT face="Arial, sans-serif">3> </FONT></DIV><DIV style="font-family: Arial, sans-serif;"><BR></DIV><DIV style="font-family: Arial, sans-serif;"><BR></DIV><DIV style=""><FONT face="Arial, sans-serif">however in OTP-21</FONT><BR><BR><DIV style=""><FONT face="Arial, sans-serif">Erlang/OTP 21 [erts-10.0.5] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1]</FONT></DIV><DIV style=""><FONT face="Arial, sans-serif"><BR></FONT></DIV><DIV style=""><FONT face="Arial, sans-serif">Eshell V10.0.5  (abort with ^G)</FONT></DIV><DIV style=""><FONT face="Arial, sans-serif">1> os:getenv("").</FONT></DIV><DIV style=""><FONT face="Arial, sans-serif">false</FONT></DIV><DIV style=""><FONT face="Arial, sans-serif">2> os:getenv(<<"">>).</FONT></DIV><DIV style=""><FONT face="Arial, sans-serif">** exception error: bad argument</FONT></DIV><DIV style=""><FONT face="Arial, sans-serif">     in function  os:get_env_var/1</FONT></DIV><DIV style=""><FONT face="Arial, sans-serif">        called as os:get_env_var(<<>>)</FONT></DIV><DIV style=""><FONT face="Arial, sans-serif">     in call from os:getenv/1 (os.erl, line 124)</FONT></DIV><DIV style=""><FONT face="Arial, sans-serif">3> </FONT></DIV><DIV style="font-family: Arial, sans-serif;"><BR><BR>Was this change deliberate?</DIV><DIV style="font-family: Arial, sans-serif;"><BR></DIV><DIV style="font-family: Arial, sans-serif;">Rich</DIV></DIV></FONT></DIV>


-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list