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 Content-Language: en-US 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 List-Archive: List-Post: List-Help: List-Subscribe: , From: =?utf-8?q?=C3=85ke_Rehnman_via_Cygwin?= Reply-To: =?UTF-8?Q?=c3=85ke_Rehnman?= Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Cygwin" 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