Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: Bize Ma Newsgroups: gnu.bash.bug Subject: Re: Fwd: read -t 0 fails to detect input. Date: Fri, 20 Dec 2019 10:40:26 -0400 Lines: 29 Approved: bug-bash@gnu.org Message-ID: References: <7e6fccb4-e5b5-eb2b-8b12-eeee9d638ae1@case.edu> <20191220085747.1401a8011f54209747d32617@schrader-schulte.de> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1576852857 8764 209.51.188.17 (20 Dec 2019 14:40:57 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash To: Martin Schulte Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4zA4i8t+cWX0AOAaP4dc5R5JlfzQGxQf6MeXG24NCvw=; b=IB6eEXemUoYKAPAZ54WWugjt3/8ucctb0nYA86adP0IGVxoPOC+qP0abQhFbb2sa02 K4kFcvPL4QmwG7DrgiQj9Q7vd8pwrXnfAb0JF/zjNzm92OkwgJsFAUQExXjjmaV+AAa9 792c2mBaDLgQLQLRiJ9L2GQj8VOUEAFuSHMWhjmazfaFKtTLB7skz4tFqVoZmtDww6MF ugmD18eCmHViZgUl2Snm2SejZfJK0YYCjPAbVHZVcd+G3aiu5d1fDffV6cn0MJOYHg5X eX4W3t4JI8lNNDWmKiHSlhx+0EJTEfwF+dSrm3lLNbkUnWsOday+sptrJRJo1IzQxFs+ 1DHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4zA4i8t+cWX0AOAaP4dc5R5JlfzQGxQf6MeXG24NCvw=; b=Qi7VbY+xqn0ye7gxJdAxNmWePt745sCyB7caDKTtlXPucYwd1YnTvErLaoHf7mWgHR 4m15MvxqGX48NpC4Mm4OQEOzsnduVZdtyOk7NCKiGl6skvbkzHmMDQtjP5hbMBO4gUyE ZexD4twpHHoVJqevkH7+9OpouFOW+Wnykg1Mvs/j+NYMBImHJoAJxiZBAk47lJTnjXiV oifcKUvAF1gGLTNsO+cXVtYcOVYfl8wZmQqtVWfaxQBh2yOk5AXnQ6bbnej18HD+h6lP +FoeK0L7/Nek72my2qU/EHhvtFMVXQPwC73dP6AtEoiAJm0/YDM4MsKqZRgtJudZnmYq +DIg== X-Gm-Message-State: APjAAAXOjbeKLkbu7Q+R6nUXyvB4DkgcvB1TbhtHcUOIdAkbpQ7+fUQs uvakMG5cEFQNHlV/jlLDazUKBLsMqGhgG9sGy7ZnUlwr X-Google-Smtp-Source: APXvYqz1HB+wO664GYhI2hfa9zyDGgs5xGNtOtbru8cmKvaM3mKWQkuSC1RlU9IVHp63JtFgRUF0AYMFwKORTOnHVLo= X-Received: by 2002:aca:5303:: with SMTP id h3mr3713498oib.109.1576852849392; Fri, 20 Dec 2019 06:40:49 -0800 (PST) In-Reply-To: <20191220085747.1401a8011f54209747d32617@schrader-schulte.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::235 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <7e6fccb4-e5b5-eb2b-8b12-eeee9d638ae1@case.edu> <20191220085747.1401a8011f54209747d32617@schrader-schulte.de> Xref: csiph.com gnu.bash.bug:15760 On Fri., 20 dec. 2019 at 3:57, Martin Schulte () wrote: > Hello! > > > Could you please comment about this assertions: > > > > 1.- bash will either do a select() or an ioctl(FIONREAD), or neither > > of them, but not both, as it should for it to work. read -t0 is broken. > > 2.- Conclusion: read -t0 is *broken* in bash. Don't use it. =E2=80=93 > > No. It works as intended. It's not usable in a pipe in the way you try, > but this is caused by the principles of a pipe, not by a bug in read. > > Hello Martin! I am not the one making those comments. I don't have enough C expertise to neither confirm or deny them. But that also makes me unable to answer to the author of the comments in the proper way. I intended to receive something t= o correct his (incorect?) opinion. In any case, thanks. Best regards, Isaac