Operating System - OpenVMS
1756024 Members
2878 Online
108839 Solutions
New Discussion юеВ

Re: TCPWARE select() replacement.

 
factor
New Member

TCPWARE select() replacement.

Versions of products.
DEC AXPVMS TCPIP V5.4-15
Compaq C V6.4-008 on OpenVMS Alpha V7.3-2

I am trying to use select() in my C program
with a socket operation on non-socket.
I have read on the Internet talking about
just this problem. Was looking to see if a replacement option was available or code snipit would provide a workaround for this limitation.

Would like to keep the code able to work on UNIX/OpenVMS. But wanted to see if other options where availble instead of a separate section of code just for OpenVMS.

4 REPLIES 4
Hoff
Honored Contributor

Re: TCPWARE select() replacement.

AFAIK, OpenVMS (still) doesn't implement select() on non-network I/O sockets. AFAIK, this isn't specifically TCPware or any other IP stack; it's a generic limit in the C run-time.

The usual approach here tends to involve threads, if you need/want portable C code. The select call itself isn't fully portable.

OpenVMS-native code often uses ASTs.

Or you conditionalize the I/O to the platform.
factor
New Member

Re: TCPWARE select() replacement.

Thanks Hoff, wanted to make sure before I got most of the way thru it, then found another way. I will make an ifdef VMS section with
the native AST stuff.
Richard Whalen
Honored Contributor

Re: TCPWARE select() replacement.

Neither TCPware nor MultiNet's select operation works on non-socket channels.

Depending upon what the non-socket channel is it may be possible to write a vms_select function that looks at the type of device behind the channel and does the appropriate sensing. Mailboxes have attention ASTs that are very similar to network attention ASTs. Terminals are harder, but can be done with an associated mailbox. I'm not sure how I would do it with a file though.
factor
New Member

Re: TCPWARE select() replacement.

Oh nifty, I will look into that, the non socket would be stdio stdout and stderr.

Yes, I was wanting to make a vms_select()
Would be nice if a code snippit of it was
hanging around some where on the internet.

Thanks for the pointers. See what I can come up with.