On Thursday 25 July 2002 02:06 pm, David King Landrith wrote: > 1. The class is used by a terminal program that will be run on one > machine by multiple people with ssh connections to that machine. > 2. The class should never be instantiated more than once on the > machine, regardless of how many people are running the program that > uses it. If this is more than one Ruby program, you'll have to do inter-process communications of some sort. Doesn't this make the job of having a singleton easy? (i.e. only one program on a machine can be accepting connections on a given port). So I'd say that each client program should: * try to connect as a client to the port * if can't connect, then fork server process on that port * and then start client > I have tried to create a singleton class using the mixin outlined > in the documentation (i.e, include singleton...xyz.instance). But > when I invoke the application concurrently (in two separate > terminal windows), the singleton class gets instantiated by both > programs. The Singleton support (as all class/object based programming in a non-distributed Ruby system) only deals with a single Ruby process. -- Ned Konz http://bike-nomad.com GPG key ID: BEEA7EFE