delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/03/11/21:05:29

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:subject:to:references:from:message-id:date
:user-agent:mime-version:in-reply-to:content-language;
bh=IJcrlvWm0RVvv4AOzTx6WR67tla0ytJd76Q/xBTX1Ms=;
b=Pbj7/iQtTlYxLCCYMNCn86/Z2RcjipGsA8NBsAXS2I7P/U2FHADkeitB3ynIYHpxZQ
lB2IZmtlRz2T7kxCQgdgIuPqrhIDYC0qnaWl+npGzjLs+4uXqcnN+O2QJuGch5Ay6WTF
V0OndIZ7LEHApLxxzMuNq4w5eYHepMtrmp7JKu/jBFRiGvWnXVmLCeeDRhHnr4H8ceM4
8HaK+G+zpUexEQ0+VnDepFpLvCRleuA9DKR9n9Z+oMrQOwLE/f+fTWHg7l37R4xF2DWp
aI7kJn9tybPJOT9bUeNHB7xsi/SGNEPNN/gwXp8++i1MuwuQir/5XW9NRa2yDFmMV/AB
A7Qw==
X-Gm-Message-State: ANhLgQ0gFU+PhQqYkUAOehwsJqcwKLR4oKWmXj+JyTyt7gX9nWSoY9+I
oU/ADYnYjCEOIkmwMHMkUnnOZuuvgFw=
X-Google-Smtp-Source: ADFU+vvCPlS5VEENAXWvZs0tOd6RbR2HPxjK3ug2CSQoEvsVbgvYkFMHbZtsnN8QaeKhKM286vyfQw==
X-Received: by 2002:ac2:5dd8:: with SMTP id x24mr1850326lfq.180.1583975077982;
Wed, 11 Mar 2020 18:04:37 -0700 (PDT)
Subject: Re: Setting termios VMIN > 0 and VTIME > 0 on non blocking file
To: cygwin AT cygwin DOT com
References: <9e4c6428-59de-df07-9e33-44ba95d5497f AT gmail DOT com>
<5be321d9-10c2-0853-b716-2abd10a4db3a AT SystematicSw DOT ab DOT ca>
Message-ID: <5541b350-9992-a0cf-ca77-43a0df83c0a8@gmail.com>
Date: Thu, 12 Mar 2020 02:04:34 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.5.0
MIME-Version: 1.0
In-Reply-To: <5be321d9-10c2-0853-b716-2abd10a4db3a@SystematicSw.ab.ca>
X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE,
HTML_OBFUSCATE_05_10, 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-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: Cygwin mailing list <cygwin.cygwin.com>
List-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
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>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On 2020-03-11 22:55, Brian Inglis wrote:
> VMIN > 0 || VTIME > 0 implies blocking; O_NONBLOCK implies SIGIO 
> delivery; see:
> 	https://www.tldp.org/HOWTO/pdf/Serial-Programming-HOWTO.pdf
> 	https://www.cmrr.umn.edu/~strupp/serial.html
> 	https://en.wikibooks.org/wiki/Serial_Programming/termios
>
> also read the man pages carefully and *assume* nothing; functions should work
> *exactly* as documented: there be dragons!
>
According to https://www.cmrr.umn.edu/~strupp/serial.html "*Timeouts are 
ignored in canonical input mode or when the/NDELAY/option is set on the 
file via/open/or/fcntl/."*

This leads me to believe the current cygwin implementation is not 
correct. Changing the VMIN and VTIME should have no effect on the read() 
behavior if the file was opened with O_NOBLOCK.
**

*
*

--
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