[erlang-bugs] escript man page

Bjorn Gustavsson bgustavsson@REDACTED
Thu Aug 28 10:32:03 CEST 2008


On Thu, Aug 28, 2008 at 6:52 AM, Bengt Kleberg
<bengt.kleberg@REDACTED>wrote:

> If trap_exit is supposed to be false (which, I agree, is what I expect)
> then either I have made a mistake somewhere(*), or there is a bug in
> escript (not the man page).
>

I didn't doubt that trap_exit indeed is set to true. I confirmed it using a
similar test program as yours.

What I meant was that trap_exit is set to true by accident, not design. It
happens that any command
run by '-run' runs in a process where trap_exit has been turned on.

I don't dare to change the general behaviour of '-run' and '-s' in a
maintenance release, but I think it
is safe to change escript (there can't be too many escripts out there
depending on trap_exit being true)
rather than documenting a counter-intuitive behaviour.

Therefore, I have now changed escript to reset trap_exit to false before
calling the main/1 function of the
script.

/Bjorn
-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20080828/38d850cd/attachment.htm>


More information about the erlang-bugs mailing list