[erlang-questions] "detached VM" vs "VM under screen"

Zabrane Mickael zabrane3@REDACTED
Sat Jan 7 20:40:49 CET 2012


Everything worked as Garrett explained after a simple reboot of my machines.
Thanks again guys for all these tricks.

By the way, dtach is simply fantastic.

Regards,
Zabrane

On Jan 7, 2012, at 4:42 PM, Garrett Smith wrote:

> On Sat, Jan 7, 2012 at 9:34 AM, Zabrane Mickael <zabrane3@REDACTED> wrote:
>> 
>> On Jan 7, 2012, at 4:04 PM, Garrett Smith wrote:
>> 
>>> On Fri, Jan 6, 2012 at 5:15 PM, Zabrane Mickael <zabrane3@REDACTED> wrote:
>>>> Hi Garrett,
>>>> 
>>>> I've tried to reproduce you example by copy and past
>>>> on both Linux/OSX R14B04 and OSX R15B:
>>>> 
>>>> Each time I kill one of these process:
>>>> - beam
>>>> - run_erl
>>>> - heart
>>>> 
>>>> the two others die too.
>>> 
>>> Killing beam or run_erl should result in the corresponding process
>>> dying as well. But if run with -heart and with a correct
>>> HEART_COMMAND, run_erl/beam be restarted.
>>> 
>>> Killing heart has the effect of killing its child processes.
>> 
>> I tried several time (copy/past your example). Same result.
>> I'll try again on virtual machine with a fresh Erlang installed.
>> Which Linux are you using Garrett?
> 
> I'm not clear on what the problem is. See next point.
> 
>> Can someone else please confirm Garret's example on his machine?
>> 
>>> 
>>>> I can't explain why.
>>>> 
>>>> By the way, the test
>>>> echo "1 + 1." | to_erl /tmp/test/
>>>> works perfectly
>>> 
>>> In your tests, did the "2 + 2" and "4 + 4" examples work?
>> 
>> Yep, they both work correctly.
> 
> I suspect you're seeing the correct behavior then. The point of the
> example is to show that, by using -heart, your Erlang process, running
> under run_erl, will be restarted whether it's the beam process or the
> run_erl process that's killed.
> 
> The fact that the "2 + 2" and "4 + 4" scenarios are working mean that
> your Erlang process is indeed getting restarted.
> 
> Garrett






More information about the erlang-questions mailing list