[Info-vax] select() returning -1
BillPedersen
pedersen at ccsscorp.com
Sat Feb 16 20:16:15 EST 2013
On Saturday, February 16, 2013 7:03:42 PM UTC-5, Sam Ferencik wrote:
> Hi,
>
>
>
> Is there something wrong with the select() call on VMS? If so, is there a workaround, or an equivalent native DEC call?
>
>
>
> ==Why I'm asking==
>
>
>
> I'm looking at a problem in vim (on VMS only): vim freezes when you encounter the "swap file already exists" dialog and you hit <Esc>. Steps to reproduce here: http://www.polarhome.com/horde/whups/ticket/?id=15
>
>
>
> I have drilled down (in the vim source code) to a select() call which always returns -1, meaning error. [http://linux.die.net/man/2/select]
>
>
>
> ==Why I suspect select() on VMS==
>
>
>
> There are two reasons I suspect this may be a VMS-specific problem of select():
>
>
>
> 1) There's a comment in the vim source code (os_unix.c) saying
>
> /* Old VMS as v6.2 and older have broken select(). It waits more than
>
> * required. Should not be used */
>
> Now, this is not my case: I'm using VMS 7.3, and select() definitely doesn't wait longer than required - it returns immediately with -1. But the comment is sufficient to raise my suspicion.
>
>
>
> 2) http://saf.bio.caltech.edu/unix_to_vms_notes.txt says that "OpenVMS select() only works on sockets, it does NOT work on files." That would perhaps explain the behaviour I'm observing - but who knows but that the website is referring to VMS <= 6.2, same as the comment?
>
>
>
> I will be grateful for any pointer.
>
>
>
> Thanks,
>
> Sam
You might look here:
https://sourceforge.net/p/vms-ports/tickets/19/
We are in discussions with HP OpenVMS Engineering as to extending select() and poll() as we work with them on *nix Portability improvements.
The above references some existing workarounds.
If you have interest in getting involved please get back to me.
Thanks,
Bill.
More information about the Info-vax
mailing list