[erlang-questions] escript questions

Kenneth Lundin kenneth.lundin@REDACTED
Mon May 21 14:01:07 CEST 2007


Hi,

The answer is that there is no support in Erlang to produce output to STDERR.
Obviously there is need for producing output to STDERR especially when you
write escripts and we plan to add support for this later this year (no
promise when)

/Regards Kenneth (OTP team at Ericsson)

On 5/17/07, Anthony Shipman <als@REDACTED> wrote:
> How do I write to stderr from a script? The io functions take a standard_io
> atom but there does not seem to be a standard_err.
>
> I tried doing
>        file:open("/dev/fd/2", [write])
> but erlang appears to refuse to write to device files.
>
> I get warning messages from unused functions in my script which I would like
> to suppress. I tried adding some dummy code:
>        unused(), ...
>
> unused() ->
>        [fun error/1, fun warning/1, fun message/2].
>
> But I just get the error:
>        escript: script failed with error reason undef
> when I do that. Is this an escript bug?
>
> --
> Anthony Shipman                    Mamas don't let your babies
> als@REDACTED                   grow up to be outsourced.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list