[erlang-questions] os:getenv regression

陈梓立 wander4096@REDACTED
Thu Sep 6 15:22:21 CEST 2018


Hi Richard,

This change was introduced by this commit
<https://github.com/erlang/otp/commit/c2d70945dce9cb09d5d7120d6e9ddf7faac8d230#diff-c74b26b137d05916452fd63150bc0ca0R113>
and
I think it is by implementation.

Best,
tison.


Raimo Niskanen <raimo+erlang-questions@REDACTED> 于2018年9月6日周四 下午9:12写道:

> 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-se
>  rif">     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
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180906/6b844d2f/attachment.htm>


More information about the erlang-questions mailing list