Mail Archives: cygwin/2001/10/14/15:21:16
Hi,
Trying to get Nickle (http://www.nickle.org/) to work under Cygwin, I'm
having problems getting stdin to work in async/nonblocking mode (that is, to
get a SIGIO when the user enters text). This is on a Windows 2000 (SP2)
running cygwin 1.3.3.
Here's the code fragment that seems to be the problem, symptoms in comments:
void
FileSetFd (int fd)
{
int flags;
fcntl (fd, F_SETOWN, getpid()); // This return EINVAL
flags = fcntl (fd, F_GETFL);
flags |= F_ASYNC|F_NOBLOCK;
fcntl (fd, F_SETFL, flags) != 0); // This succeeds, but has no effect
{ // Tried the following based on something I found in the cygwin mail
archive,
// to no avail.
int yesplease = 1;
ioctl( fd, FIOASYNC, &yesplease );
}
}
Possibly relevant info: Nickle is a multi-threading (posix threads)
application, hence the need for async I/O. User-visible symptom: Prompt is
displayed, but no response to keyboard. Sending SIGIO via 'kill' from
amother shell causes the user input to be processied correctly!
From the mailing list archive, I see a few questions about this, but no
answers. perusing the source & ChangeLogs isn't very informative either, I'm
afraid.
Any information on the status of this (known bug, never to be implemented,
etc.) gratefully accepted.
Thanks,
Rony
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -