The Question is:
I have written a server process in Pascal,
which is started through the TCP/IP Auxiliary
This server process then assigns SYS$INPUT and
SYS$OUTPUT to SYS$NET, and basically has the
following main loop:
WHILE STATUS( input ) = 0 DO BEGIN
READLN( inBuffer, ERROR := CONTINUE );
Process_Input( inBuffer );
This normally works very well.
I cannot stop this server process using $FORCEX
or STOP /ID, when a connection is active.
If I try to do this, the process goes into
RWAST state. It only goes away when the client
also closes the connection.
This is quite nasty, since I first have to find
out where the client is, and make him close the
Is there a way to really kill such a Auxiliary
Server process, which works even if the client
is just hanging around?
I have noticed that, if the client is just
plugged out without nicely terminating the
link, it takes about ten minutes, then the
RWAST resolves itself somehow, and the server
really disappears. Can this be influenced
(i.e. speeded up) somehow?
Thanks for your help
The Answer is :
The OpenVMS Wizard cannot and does not recommend redirecting output
from or input to SYS$NET in this fashion -- this particular coding
technique is problematic at best and is not particularly desirable
from any application executable nor from a DCL command procedure.
Among other problems, this technique will cause any application error
messages and any system or application diagnostics to be redirected.
Please use the documented IP application programming interfaces --
$qio and $qiow for applications not written in C, and the C socket
library and $qio and $qiow for applications written in C -- for
reading and writing IP messages.
Using the asynchronous form of the call ($qio), you can also write
a network server that uses AST notifications.
Examples of the $qio interface are available in the TCP/IP Services
documentation. Examples of socket calls are in TCPIP$EXAMPLES:, and
in UCX$EXAMPLES: on TCP/IP Services releases prior to V5.0.
The OpenVMS Wizard will assume TCP/IP Services V5.1 with ECO.