Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Rony Shapiro" To: Subject: 1.3.3: fcntl F_{SETOWN,ASYNC} seems broken? Date: Sun, 14 Oct 2001 21:18:24 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1255" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 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/