[731] in Zephyr_Bugs
Re: zwgc's /tmp/wg.
daemon@ATHENA.MIT.EDU (R. Bernstein)
Mon Dec 11 14:42:26 1995
Date: Mon, 11 Dec 1995 14:41:35 -0500
From: "R. Bernstein" <rocky@drmsr011.drm.pwj.com>
To: "Derrick J. Brashear" <shadow+@andrew.cmu.edu>
Cc: bug-zephyr@MIT.EDU, murali@drmsr011.drm.pwj.com,
rocky@drmsr011.drm.pwj.com
In-Reply-To: <Added.ckm5w1600Udi02Bk4x@andrew.cmu.edu>
Reply-To: rocky@drmsr011.drm.pwj.com
You wrote:
> The wg file contains the port number that zwgc is listening on. I.e. for each
> invocation of zwgc, it grabs a port and listens, and if you run zctl, this is
> how it determines what it should be talking to.
>
> When you run a new zwgc, you "lose" the ability to use zctl to talk to the old
> one, if you overwrote the old file.
> You can use the WGFILE environment
> variable to set different wg files, but you'll need some way to change back and
> forth when you want to control different zwgcs.
>
> Hope this helps.
> -D
What would the implications of zwgc being changed so that it looks to
see if there already is a wg file and uses that port instead of a new
one? If this can be done, I'd imagine zctl would have an effect on
both processes. So it might be useful to have an option saying this is
okay or not (and if not another file name might be used).
If overwriting the wg file is not such as good thing as happens
now, wouldn't it be better to give a warning when the file is first
overwritten? Instead of overwriting the file, perhaps it should die and
suggest using the WGFILE environment variable. Or again maybe an
option can be used to allow overwriting the file.
If you can suggest the right behavior, I'll look into
changing the code.