[erlang-questions] Restarting processes

Philip Robinson philar@REDACTED
Thu Mar 29 18:11:04 CEST 2007


>I don't want that state to be lost. So, I need my workers to resubscribe
>to restarted demux. How can I handle it nicely?

If I try to monitor a dead process I get another 'DOWN' message.

Have you tried something like this?

loop() ->
    receive
        {'DOWN', _Ref, process, MonitoredProcess, _Reason} ->
            erlang:monitor(process, MonitoredProcess),
            loop();
        ...


Cheers,
Philip

_________________________________________________________________
Advertisement: Chat with 1000s of Sexy Singles right now 
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Flavalife9%2Eninemsn%2Ecom%2Eau%2Fclickthru%2Fclickthru%2Eact%3Fid%3Dninemsn%26context%3Dan99%26locale%3Den%5FAU%26a%3D25447&_t=754951090&_r=chat&_m=EXT




More information about the erlang-questions mailing list