Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: winalski@adserv.enet.dec.com (Paul S. Winalski)
Subject: Re: Exec, Spawn, Objects in VMS
Date: Tue, 25 May 1993 15:21:03 GMT	[thread overview]
Message-ID: <1993May25.152103.6262@dbased.nuo.dec.com> (raw)
In-Reply-To: 1993May25.101807.8847@visionware.co.uk


In article <1993May25.101807.8847@visionware.co.uk>,
chetanm@visionware.co.uk (Chetan Mistry) writes:
|>
|>	Whats the best way to exec another program with another program. ?
|>I have a DECnet object which listens for connections and then opens
|>"SYS$NET" channel to read information about which server it has to fire off.
|>The server program should use the same channel (ie. "SYS$NET") to talk to
|>the remote program. 

This is not the way that DECnet-VAX is designed to operate.  The way you're
supposed to use it is to define a separate object for each server.  The Unix
inetd model is not the DECnet paradigm.

In trying to do something like this, you're faced with two major problems:

1) One and only one I/O channel can be opened on SYS$NET:.  All DECnet
   communications have to take place over that channel.  In particular, a
   subprocess cannot access its parent's DECnet link.

2) Once you close SYS$NET:, the DECnet link is broken.  This means that if
   you open SYS$NET: from within a program (i.e., in user mode), you cannot
   run another program in that process and have it talk over the DECnet
   channel (because I/O rundown of the first program will close the DECnet
   link).

The easiest way around these difficulties is to open SYS$NET: for read and
write access from DCL.  Define your DECnet object to run a command procedure.
Within the procedure, accept the logical link using a DCL OPEN statement:

	$ OPEN/READ/WRITE NETCHAN SYS$NET:

You now have the DECnet link open as a process-permanent file, which means that
it won't be closed upon exit of a user-mode program.  You can now access it
from within programs using logical name NETCHAN.  Your program that reads the
info about which server to fire off can then use LIB$RUN_PROGRAM to run
the correct server.

--PSW


  reply	other threads:[~1993-05-25 15:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-05-25 10:18 Exec, Spawn, Objects in VMS Chetan Mistry
1993-05-25 15:21 ` Paul S. Winalski [this message]
1993-05-26 14:27   ` Jan Vorbrueggen
1993-05-26 20:14   ` jeh
1993-05-25 16:12 ` jeh
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox