VMS: logicals UNIX: links, but...
Anton Rang
rang at cpsin3.cps.msu.edu
Mon Apr 17 02:46:27 AEST 1989
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 at cpswh.cps.msu.edu | |
+---------------------------+------------------------+----------------------+
More information about the Comp.unix.questions
mailing list