plash-socket-connect — Get a reference to a Plash object that was exported to a socket


def variable-name = capcmd plash-socket-connect => socket-pathname


The program plash-socket-publish will make a Plash object reference available via a socket. plash-socket-connect is its counterpart: it gets a copy of the reference from the socket, and returns it. These programs can be used to share object references between different instances of the Plash shell.

This is a command that is only useful when called using a "capcmd" expression from Plash.

You must grant the program write access to the socket for it to be able to connect to the socket (hence the use of "=>" in the synopsis).

Return value

The return value given by exit() isn't used. This program returns an object reference using the "return_cont" mechanism. It doesn't exit until all the references to the object have been dropped.


The process has to stick around as a proxy to forward method calls.


def edit_file = capcmd plash-run-emacs ...
plash-socket-publish => ~/tmp/emacs /x=edit_file

Then in another shell:

def edit_file = capcmd plash-socket-connect => ~/tmp/emacs
edit_file => some-file.txt

See also

plash, plash-socket-publish, plash-run-emacs



Mark Seaborn <>