delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/03/11/16:48:57

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:to:from:subject:message-id:date:user-agent
:mime-version:content-transfer-encoding:content-language;
bh=PNkujLLAqVhdXfLd8OMIkWbPPd3t8aU2Bu9x4eARUF0=;
b=shWsU/ayYyUDFxbwrriqfEZe4ZUFvI7L1gsymqoTj6Mnlpkzi1hmF/3iaUmfK+3Xdb
vtiN4Y1NMXSVZm50RcVePlM0wAlIIts+l9v/vIDnUAAH/YvxxZ/380Txrd8LP7Bf0q0x
LIRFm7vgy/+Kf15jMYH28YhJCNsmFkRGOLUrpOzsDfKiKzk23GHdvlTDtUbO21LOx+qE
/b5s3qHXAY2D+SxLJy4XQL8x5ycB5/iHyduC/yfl8wO1Rss+jEmQ125DrTZKDF04qPGW
b/bX6B1CzRzFGP/i8pv0RgHKXxpxTYZn4skbTc4RfLuniwRgi+ipA1lI22aonAHyQjsx
w6yw==
X-Gm-Message-State: ANhLgQ3knyK8VyY6JrRKjtN6vkWPanQZE57aESF4+/v4EqBsvHr3jSKe
/sDTdV14ROG2oEsqXengy27TOk4wekM=
X-Google-Smtp-Source: ADFU+vvFK57J0OWPdSgZvqqskBAgTTxq0BjKFQrmfb6oFkPYEwc1To7b9Rs7i1Ly+GoUAeLcIUbsqw==
X-Received: by 2002:a05:6512:28a:: with SMTP id
j10mr3255827lfp.86.1583959689041;
Wed, 11 Mar 2020 13:48:09 -0700 (PDT)
To: cygwin AT cygwin DOT com
Subject: Setting termios VMIN > 0 and VTIME > 0 on non blocking file
Message-ID: <9e4c6428-59de-df07-9e33-44ba95d5497f@gmail.com>
Date: Wed, 11 Mar 2020 21:48:05 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.5.0
MIME-Version: 1.0
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: Cygwin mailing list <cygwin.cygwin.com>
List-Archive: <http://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: =?utf-8?q?=C3=85ke_Rehnman_via_Cygwin?= <cygwin AT cygwin DOT com>
Reply-To: =?UTF-8?Q?=c3=85ke_Rehnman?= <ake DOT rehnman AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

Hello all,

opening a file (serial port) with O_NONBLOCK and subsequently setting 
termios VMIN and VTIME > 0 makes read() never ever return any data 
(returns EAGAIN indefinitely).

Don't ask my why one would want to do something like this but apparently 
the "screen" program think this is a good way of doing things...

Nevertheless not returning any data ever seems wrong.

Any insight on how it is supposed to work is welcome.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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