 |
The Question is:
I've been trying, without much success, to find information and examples on
writing a TCP/IP listener that passes each new connection to a new detached
process. As far as possible, I would like to avoid OpenVMS system services in
favour of standard socket
and C rtl calls, since we use multiple platforms, but I do believe I will need
to use sys$creprc. The listener itself poses no problems but the aspect that I
am unsure of is how to pass the open TCP/IP channel into the newly created
process. Can it be SY
S$INPUT/SYS$OUTPUT for the new process?
I realise I could avoid this problem by using a TCP/IP service instead of
having my own listener, but I don't want to do that firstly for platform
independence and secondly because the listener peeks at the start of the
incoming data to decide what progra
m to start up.
I know that creating new processes on OpenVMS is more onerous than on UNIX but
that is not an issue - the processes are long lived rather than there being a
lot of them.
Thanks,
Mark
The Answer is :
Topics including (2474), (3995), (4216), (6962), (7285) and others
will likely be of interest to you here.
The OpenVMS Wizard would tend to use sys$input and sys$output for
program input and output -- attempting to use these for remote
input and for program output might be tempting, but it tends to
encounter problems when, for instance, the program stackdumps and
inadvertently reveals something unexpected over the socket connection.
Using sys$input and sys$output for input and output also means that
these are available for debugging and particularly for logging-related
purposes, something that will be of interest here. For details, see
topics (4640), (3681), (3031) and the topics referenced in (8028).
|