Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!ukc!etive!lfcs!paul From: paul@lfcs.ed.ac.uk (Paul Anderson) Newsgroups: comp.protocols.appletalk Subject: Re: Remote shell command on Unix, originating from Macintosh Message-ID: <1593@etive.ed.ac.uk> Date: 16 Mar 89 15:08:51 GMT Sender: news@etive.ed.ac.uk Reply-To: paul@lfcs.ed.ac.uk (Paul Anderson) Organization: Laboratory for the Foundations of Computer Science, Edinburgh U Lines: 34 -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