From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from postman.osf.org ([130.105.1.152]) by hawkwind.utcs.toronto.edu with SMTP id <2752>; Tue, 13 Apr 1993 10:39:18 -0400 Received: from earth.osf.org by postman.osf.org (5.64+/OSF 1.0) id AA00532; Tue, 13 Apr 93 10:39:03 -0400 Received: by earth.osf.org (5.65/4.7) id AA04387; Tue, 13 Apr 93 10:39:02 -0400 Date: Tue, 13 Apr 1993 10:39:02 -0400 From: rsalz@osf.org Message-Id: <9304131439.AA04387@earth.osf.org> To: sam-fans@hawkwind.utcs.toronto.edu Subject: Naming the pipe I think the following patch to samterm/unix.c is a good idea. It allows the environment variable $sampipe, if set, to specify the name of the fifo. *** unix.c.save Tue Apr 13 10:31:46 1993 --- unix.c Tue Apr 13 10:33:25 1993 *************** *** 70,84 **** int fd; int flags; ! user = getuser(); ! disp = getenv("DISPLAY"); ! if (disp) { ! exname = (char *)alloc(4 + 6 + strlen(user) + 1 + strlen(disp) + 1); ! sprint(exname, "/tmp/.sam.%s.%s", user, disp); ! } else { ! exname = (char *)alloc(4 + 6 + strlen(user) + 1); ! sprint(exname, "/tmp/.sam.%s", user); } /* Make the named pipe. Multiple sams with the same user/display share the same pipe */ --- 70,90 ---- int fd; int flags; ! disp = getenv("sampipe"); ! if (disp == 0) { ! user = getuser(); ! disp = getenv("DISPLAY"); ! if (disp) { ! exname = (char *)alloc(4 + 6 + strlen(user) + 1 + strlen(disp) + 1); ! sprint(exname, "/tmp/.sam.%s.%s", user, disp); ! } else { ! exname = (char *)alloc(4 + 6 + strlen(user) + 1); ! sprint(exname, "/tmp/.sam.%s", user); ! } ! } else { ! exname = (char *)alloc(strlen(disp) + 1); ! strcpy(exname, disp); } /* Make the named pipe. Multiple sams with the same user/display share the same pipe */