[Info-vax] select() returning -1
Samuel Ferencik
sferencik at gmail.com
Sat Feb 16 19:03:42 EST 2013
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
More information about the Info-vax
mailing list