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

Bernard Duggan <>
Thu Feb 18 22:49:08 CET 2016


Hi Joe,
>From your question, you might want to have a look at erld (
https://github.com/ShoreTel-Inc/erld). It provides a wrapper around Erlang
which will capture the output of a "detached" Erlang node and log it. It
also provides a bunch of other daemon-like behaviour (capturing signals for
log rotation, startup return values etc). It doesn't currently allow for
reattachment, but you can always --remsh into the node assuming it's named.

Cheers,

Bernard

On Fri, Feb 19, 2016 at 7:42 AM, Richard Carlsson <
> wrote:

> (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
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160219/2085c43f/attachment.html>


More information about the erlang-questions mailing list