This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

trouble with io system calls


I was trying to get a wordstar style editor called "ted" to work under cygwin b19 and was unable to get it to work. The author of the editor also tried to get it to work and he reported the problem below. I just thought I would post his findings to see if it makes sense to anyone and find out whether there is a work around or a fix in B20. 

----------------------------------------------
(Note from the author of ted) 
Well, I give up on getting ted to run under Cygwin. Ted uses certain system calls to control keyboard behavior, and these calls simply do not work correctly under Cygwin. Since these same system calls work fine under several Unix versions I am convinced that the problem is due to Cygwin bugs, not my bugs. Probably there is some work-around, but I do not have the time to search it out. In case you are REALLY interested in this, here are some details:
 
Ted needs to be able to read the keyboard 3 different ways: 1) using non-blocking mode where if a character is not available then the read system call returns immediatlely, 2) using blocking mode where the system call does not return until a character is available, and 3) using "timeout" mode, where the system all waits a certain length of time for a character, but then returns even if none is available. Ted uses the standard "read" system call on standard input for all 3 modes of input, and used "ioctl" system call (or its POSIX equivalents) to control the input mode. However, after making the POSIX system call to set non-blocking mode the next read system call hangs. The non-POSIX version does not work right either--although the particulars are different (the non-POSIX version required changes to get it to compile).

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]