[erlang-questions] where does output go in detached mode

Richard Carlsson <>
Thu Feb 18 21:42:57 CET 2016


(No idea why gmail decided to send my previous reply before I got a chance
to actually type anything; please ignore that one.)

2016-02-18 12:46 GMT+01:00 Joe Armstrong <>:

> Hello,
>
>  I start erlang with
>
>     $ erl -detached
>
> and have two questions:
>
> 1) If program does io:format(Format, Data) where does the output go?
>

/dev/null


> Does the output just vanish, or do I have to unclog some buffers
> eventually?
>

It's gone.

2) Can I attach to the process later?
>

Yes, but only if you launch erl via the run_erl wrapper; see
http://erlang.org/doc/man/run_erl.html
You can then attach to the running Beam later using to_erl (which seems to
be still not documented...).

    And if so does this work on the three major platforms OS-X, linux and
>     windows?
>

The docs say "on Solaris" in the summary line, which is probably no longer
the most popular platform for Erlang, but yes, it's for Linux too - and I
would guess it works on BSD/OSX and similar, but you're probably supposed
to use something completely different on Windows.

     /Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160218/e2bc137d/attachment.html>


More information about the erlang-questions mailing list