Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: jeh@cmkrnl.com
Subject: Re: Exec, Spawn, Objects in VMS
Date: 25 May 93 09:12:09 PDT	[thread overview]
Message-ID: <1993May25.091209.2060@cmkrnl.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. 

> Questions :-
> 1. If I use one of the 6 exec routines (execl, execvp, etc) will I 
> be able to reopen the "SYS$NET" channel from within the server??

By your DECnet object listening for connections I presume you mean that it's
assigned a channel to NET0:, declared its name, and is reading from a mailbox
associated with NET0:. 

If you are talking about one server receiving multiple inbound connects 
(looks like you are), you don't use SYS$NET.  SYS$NET is a process-specific
logical name.  Newly-created network processes (target tasks) are created with
SYS$NET pointing to the DECnet logical link which they were created to service.
Subsequent attempts to create logical links to the same process have no way 
of reaching into the process logical name table and defining a new equivalence
name for SYS$NET.  (Well, actually this IS possible with special kernel ASTs,
but anyway, DECnet doesn't do that.)

Here's how it's supposed to go:  After getting a mailbox message indicating an
inbound connect attempt, you assign another channel to NET0: (which yields a
channel assigned to some other NETnnn: device), then issue a $QIO IO$_ACCESS
with a P2 argument containing the NCB which you read from the mailbox.  From 
then on IOs to this new channel are communicating with the new logical link.

If you want the various "connections" to be served by different processes you
can certainly execxxx() or LIB$SPAWN another process, pass the NCB to it via a
mailbox or a job-wide logical name or whatever, and let it do the $QIO
IO$_ACCESS.  

> 3. Is it possible to kill off the original object after it has started
>    server 

If you mean kill off the process that was listening to the mailbox, yes, as
long as the process it creates (the server) isn't a subprocess.  (If it is, 
it'll die as soon as its creator dies.)

	--- Jamie Hanrahan, Kernel Mode Systems, San Diego CA
drivers, internals, networks, applications, and training for VMS and Windows NT
uucp 'g' protocol guru and release coordinator, VMSnet (DECUS uucp) W.G., and 
Chair, Programming and Internals Working Group, U.S. DECUS VMS Systems SIG 
Internet:  jeh@cmkrnl.com  Uucp: uunet!cmkrnl!jeh  CIS: 74140,2055


      parent reply	other threads:[~1993-05-25 16:12 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
1993-05-26 14:27   ` Jan Vorbrueggen
1993-05-26 20:14   ` jeh
1993-05-25 16:12 ` jeh [this message]
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