[945] in Zephyr_Bugs

home help back first fref pref prev next nref lref last post

zwgc pid issues

daemon@ATHENA.MIT.EDU (Gene Skonicki)
Mon Jul 27 17:44:41 1998

To: zephyr-bugs@MIT.EDU
Date: Mon, 27 Jul 1998 16:44:31 -0500
From: Gene Skonicki <gene@imsa.edu>


This may have been argued on or decided upon by executive decision, but I
wnated to present it nonetheless.

Here, we are implementing zephyr mainly as a convenience for our users to
communicate transparently across the several machiens that make up our main
server cluster.  This is different then a distributed workstation model.

In any case, people start mutliple instances of zwgc on the same machine.
For example, a faculty member leaves himself or herself logged in over the
weekend from their workstation and telnets in from home.  When the person logs
out form home, he or she loses their /tmp/wg.{uid} file they need for
communicating.  This means they can't add sbuscripts or perform any other
windowgram commands like this.

So, below is a one-line diff that makes each instance of zwgc unique on a host
and avoids unlink()'ing /tmp/wg.getuid().  I hope you'll consider applying it.
It makes no functional difference for current users, and for thsoe who have
needs such as ours, it is a boon.

Gene

*** zephyr.c.orig	Mon Jul 27 16:27:14 1998
--- zephyr.c	Mon Jul 27 16:35:52 1998
***************
*** 92,98 ****
      if (temp = getenv("WGFILE"))
        return(temp);
      else {
! 	sprintf(buffer, "/tmp/wg.%d", getuid());
  	return(buffer);
      }
  }
--- 92,98 ----
      if (temp = getenv("WGFILE"))
        return(temp);
      else {
! 	sprintf(buffer, "/tmp/wg.%d.%d", getuid(), getpid());
  	return(buffer);
      }
  }

home help back first fref pref prev next nref lref last post