Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!shadooby!accuvax.nwu.edu!tank!eecae!cps3xx!rang From: rang@cpsin3.cps.msu.edu (Anton Rang) Newsgroups: comp.unix.questions Subject: Re: VMS: logicals UNIX: links, but... Message-ID: <2560@cps3xx.UUCP> Date: 16 Apr 89 16:46:27 GMT References: <475@caldwr.UUCP> <810036@hpsemc.HP.COM> <1002@quintus.UUCP> Sender: usenet@cps3xx.UUCP Reply-To: rang@cpswh.cps.msu.edu (Anton Rang) Organization: Michigan State University, Computer Science Dept. Lines: 54 In-reply-to: ok@quintus.UUCP's message of 16 Apr 89 02:17:26 GMT This is my last note on this topic (I can hear the cheering now). One thing which *nobody* has yet pointed out is that VMS logical names can be (1) persistent, and (2) not just local to a process. This can be useful. Why? Here's an example. I write a server using mailboxes (VMS)/sockets(UNIX). I'm not a superuser, just an ordinary person. Now, other people in my group (remember this) want to be able to access the server via a client which I've also written. How can they get to it? (1) VMS. Here, I have my program installed with GRPNAM privilege, letting me write into the group table. I create a logical name, SERVMBX perhaps, with the name of the mailbox which my program was assigned. The client program opens SERVMBX, and is connected to my mailbox (talking to the server). All is fine and dandy. (2) UNIX. I don't know sockets as well, so please bear with me. Assume first that I'm using UNIX-domain sockets. I can then create a socket, named /.../some-directory/some-name. The client can look in this place. BUT...how can I handle the case where there is more than one server on the system? (I.E., how will the client know where to look?) Also, if I want this program to be easily portable between systems, I don't want to hard-code a directory path. I can use an environment variable instead. BUT...how can the client find the socket without the user having to manually set up this environment variable? (In the Internet domain, things get even more complicated--but that's a different issue since it really deals with intermachine communication.) Thoughts? I would also like to be able to have a program which sets up environment variables. This way, I could create a program (called 'setup' perhaps) which would assign a default search path to my environment variable, and the user could type 'setup' to get the environment right before they ran the program. However, as far as I can tell, there is no way to programmatically set (for later use by a shell) environment variables. True? False? (If false, how do you do it???) These arguments also apply to system-wide packages. Suppose I install SuperPackage. It wants an environment variable SPDIR to contain its search path. Is writing a shell script to first set this variable, then run the package, the only way to make it accessible to users? If so, what happens to the unsuspecting user who sets SPDIR to ~/my_sp and expects it to look there? As I said, my last posting (unless something here needs clarification.) I think I have philosophical differences with some of the others discussing this, and shouldn't waste time on a public forum arguing them. Anton +---------------------------+------------------------+----------------------+ | Anton Rang (grad student) | "VMS Forever!" | "Do worry...be SAD!" | | Michigan State University | rang@cpswh.cps.msu.edu | | +---------------------------+------------------------+----------------------+