[comp.protocols.appletalk] Remote shell command on Unix, originating from Macintosh

alanr@mit-amt (Alan Ruttenberg) (03/15/89)

It would be nice if one could use Aufs as a method to execute a shell
command on a unix machine. Why, it should be easy to extend Aufs to
check for the writing of a file with a magic name, and, when this file
were written, forking off a shell to run it, perhaps deleting the
file, or rewriting it with status when the process exits, as a signal
that the process is done.

I would really like to be able to manipulate our vaxes under program
control on our macintoshes. Has anybody done something like this, or
if not, is there someone familiar enough with aufs to give me pointers
on how to do the modification I've suggested above.

-Alan Ruttenberg
alanr@ems.media.mit.edu (MIT Media Lab)

paul@lfcs.ed.ac.uk (Paul Anderson) (03/16/89)

   -Alan Ruttenberg alanr@ems.media.mit.edu (MIT Media Lab) says .....
>
>   It would be nice if one could use Aufs as a method to execute a
>   shell command on a unix machine. Why, it should be easy to extend
>   Aufs to check for the writing of a file with a magic name, and,
>   when this file were written, forking off a shell to run it, perhaps
>   deleting the file, or rewriting it with status when the process
>   exits, as a signal that the process is done.
>

I have made a hacked version of AUFS which does this kind of thing.
Opening a filename that starts with a !, causes AUFS to start a subprocess
running the contents of the file as a shell script. Anything written to the
file by the Mac is passed to the standard input of the script and anything
read from the file is taken from the standard output of the script. Closing
the file kills the process.

This has been used here to build a Hypercard front-end to programs running
on the Sun. It is possible to open several processes simultaneously, and we
have even had hypercard controlling several X windows on the Sun at the
same time as talking to an ML interpreter.

The implementation was a quick-and-dirty experiment - it works but it is
easy to deadlock the server and some care is needed to set up a protocol
between the Mac and the UNIX process.

I guess I could try to put together a set of patches based on CAP 5.0 if
anyone is interested.

Paul Anderson                       JANET: paul@uk.ac.ed.lfcs
LFCS, Dept. of Computer Science     UUCP:  ..!mcvax!ukc!lfcs!paul	
University of Edinburgh             ARPA:  paul%lfcs.ed.ac.uk@nss.cs.ucl.ac.uk
Edinburgh EH9 3JZ, UK.              Tel:   031-667-1081 Ext 2788