delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/14/15:21:16

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: "Rony Shapiro" <ronys AT gmx DOT net>
To: <cygwin AT cygwin DOT com>
Subject: 1.3.3: fcntl F_{SETOWN,ASYNC} seems broken?
Date: Sun, 14 Oct 2001 21:18:24 +0200
Message-ID: <KHEGKKOPPNOLICPLBKDOGEGCCFAA.ronys@gmx.net>
MIME-Version: 1.0
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019