[erlang-questions] Slave node and open file

Nicholas Frechette <>
Wed Jul 7 15:59:12 CEST 2010

Couldn't you connect the slave to the master and link against say, the
supervisor process of the master? If the node goes down or shuts down, won't
that take down the slave as well?
You could even do all that from the master node via rpc module (ie: fork
slave node with name 'foo', use rpc to fork a process that links both the
process on the master that simply kills the slave node when it receives the
node down message).
You can even send the code from the master such that it doesn't need to be
where the slave is started.
Unless there is a cleaner way to do it, that's probably how I would hack it
up if I had to.

On Wed, Jul 7, 2010 at 2:37 AM, Bertrand Paquet <> wrote:

> On Tue, Jul 6, 2010 at 21:02, Nicholas Frechette <>
> wrote:
> > Unless I am mistaken, the erlang master/slave modules are designed such
> that
> > all IO (perhaps only file system IO) on the slave is redirected to the
> > master. This allows slaves to read/write to the master while doing the
> heavy
> > lifting on the remote cpu.
> > I'm not sure if you can access the slave's file system that way.
> Network IOs are not redirected, but stdout and file IO seems to be :-)
> Do you know a solution to have the same function as slave:start,
> without redirection ?
> - start a remote node using rsh
> - stop remote nodes when killing master
> Actually, I do that with os:cmd("ssh remote erl ..."), but it's not
> very clean. And the remote erlang vm is not killed when I kill the
> master.
> Regards,
> Bertrand

More information about the erlang-questions mailing list