[Info-vax] select() returning -1

BillPedersen pedersen at ccsscorp.com
Fri Apr 5 18:00:54 EDT 2013


On Friday, April 5, 2013 5:22:50 PM UTC-4, Sam Ferencik wrote:
> On Wednesday, February 20, 2013 12:40:05 PM UTC+1, Neil Rieck wrote:
> 
> > On Saturday, February 16, 2013 7:22:54 PM UTC-5, Sam Ferencik wrote:
> 
> > 
> 
> > > It seems select() really only works for sockets. The return value of -1 is accompanied by errno = 38, which is (errno.h):
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > #define ENOTSOCK        38     /* Socket operation on non-socket        */
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > So, is there an alternative call available on VMS?
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > Thanks,
> 
> > 
> 
> > > 
> 
> > 
> 
> > > Sam
> 
> > 
> 
> > 
> 
> > 
> 
> > You might wish to check out my research on "bad select 38" here:
> 
> > 
> 
> > 
> 
> > 
> 
> > http://www3.sympatico.ca/n.rieck/docs/openvms_notes_ssl.html#bad-select-38
> 
> > 
> 
> > 
> 
> > 
> 
> > As others have already posted, while it appears you can use "select()" on any unix program while applications on other operating systems (Like Windows, DOS, and OpenVMS) require you to do non-socket i/o. "TERM_SOCK.C" is a little program stub published by Compaq to do just this in OpenSSL-1.1B
> 
> > 
> 
> > 
> 
> > 
> 
> > http://www3.sympatico.ca/n.rieck/demo_vms_html/openvms_demo_index.html#openssl
> 
> > 
> 
> > 
> 
> > 
> 
> > Neil Rieck
> 
> > 
> 
> > Kitchener / Waterloo / Cambridge,
> 
> > 
> 
> > Ontario, Canada.
> 
> > 
> 
> > http://www3.sympatico.ca/n.rieck/OpenVMS.html
> 
> 
> 
> Thanks all for your input; I haven't had time for this yet.
> 
> 
> 
> I just looked at poll() and it won't do since poll.h isn't even shipped with some versions of VMS. Neither can vim assume the minimum version of Alpha V7.3-2 that Stephen mentions above. <sigh>
> 
> 
> 
> That means I'll be trying $QIO. Thanks for all the helpful code samples linked.
> 
> 
> 
> Sam

Sam, before you "give up" and go to $QIO you might want to look at a couple libraries which have been developed to help with porting.

One is the GNU VMSLIB and the other is the HP Porting Library.

You can find the GNU VMSLIB by just going to Google and searching...

The HP Porting library can be found a couple places.  Generally the same code but with slightly different documentation.  You can go here:

Download kit at: 

	ftp://ftp.hp.com/pub/openvms/ips/ 

You can also download an alternate kit from Jouk Jansen's site:

	ftp://nchrem.tnw.tudelft.nl/openvms/PORTING_LIBRARY-A9.ZIP

The HP release notes are here:

        http://h71000.www7.hp.com/openvms/products/ips/porting_relnotes.html


And you can find other information here:

        http://h71000.www7.hp.com/ebusiness/technology.html

Some of the links are broken but the above other notes and links will help you get a kit.

These are both "technology kits"  not necessarily working code but examples that have been used and could be incorporated to help your port.  The kits date from well before version 7.x.

Good luck with your efforts.

If you would like to get involved in a regular discussion of Open Source porting to OpenVMS we have a conference call every two weeks with OpenVMS Engineering to discuss issues.  We also have a bug / problem reporting system and some notes on how you might go about porting on the VMS-Ports SourceForge Project.

Bill.



More information about the Info-vax mailing list