Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: Matteo Croce Newsgroups: gnu.bash.bug Subject: Re: bash sets O_NONBLOCK on pts Date: Wed, 2 Oct 2019 20:43:35 +0200 Lines: 38 Approved: bug-bash@gnu.org Message-ID: References: <5d94e361.21745@msgid.achurch.org> <87tv8r8132.fsf@igel.home> 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 1570041859 14632 209.51.188.17 (2 Oct 2019 18:44:19 GMT) X-Complaints-To: action@cs.stanford.edu Cc: Andrew Church , bug-bash@gnu.org To: Andreas Schwab Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1570041855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z5Vo8r1ZxaltNY8bIJK6jYfKW3mLyZj9I7z9jCVARRM=; b=h+kYwl17J1CB2uUfmjIZwuDb+WlZy1EYwydZPwyQEpNRsL5vm73bNj7i2PiTv6xWGkqERn jr1jGEoSrSMTkH2b2lLQPSK8kKazolvql+OtOQxyjPc0ww5KGJrnTOoVdE6oc1Bj37lujy ckkJa6irSB7hD0+pn/v98pwuwh1VJRg= 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=wuQ1/kYazGN2JH337d+bSFWpO67N42e4Hofpyycx4CQ=; b=FzhLDlW5idB2wEL9Jnu2ECpEjcg+erFGRgy86bIsX6+2GQ82QWxDvET4oAroActiqq fwr+B5nQyDBItmw1hlugHNlrw2nrAJeafgM9qXLDUsEAR2HZAEIpd/ZheBt9TUNHghyr lCRRarqA4C3LIr5JUyZaYhx9rzOKESeAEcevlsqYfr8j32c3eihXnHVQNxQIaQhGhveZ tD3aH1fAt/+80YenyOs6PVxNU1S0LYY21PIHC/eqJWReV/I3pffnLUJoSxLK2jQQ8JYY FMBfoGbq8tpctSjBE3tmthB2SQZoSYaNjjD4SiGY38bxuRhv6MWiXqgC8rxl/ngJ6E7r YGCA== X-Gm-Message-State: APjAAAVJpRxGWxntmxW4UWPHPC78MoujbuSK57EeNvlyGG2Ij7LrLAg5 IG0mhZvD9SjwiA6Sbky22kwj2S5izgGu/e+aSVb10OeBtwwS/IvUK+oUq1skHSVewogsNhh+hSR d0OmUjdQOsPAsnnFqU2wXVTLa X-Received: by 2002:a2e:5714:: with SMTP id l20mr3488415ljb.122.1570041851496; Wed, 02 Oct 2019 11:44:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxE+ycr1e0Iqegp6P85zaFFzGRYUwkIhXnDxFyNnCJITuxJx7MBMDhT69vZccUBcuk7aqjakZaktrQK+/nNB54= X-Received: by 2002:a2e:5714:: with SMTP id l20mr3488410ljb.122.1570041851327; Wed, 02 Oct 2019 11:44:11 -0700 (PDT) In-Reply-To: <87tv8r8132.fsf@igel.home> X-MC-Unique: D-eKjeHFP3S4jsSfBDpfPQ-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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: <5d94e361.21745@msgid.achurch.org> <87tv8r8132.fsf@igel.home> Xref: csiph.com gnu.bash.bug:15465 On Wed, Oct 2, 2019 at 8:16 PM Andreas Schwab wrote= : > > On Okt 02 2019, Matteo Croce wrote: > > > It seems to me that bash restores the flag, cat prints an error when no= t: > > > > $ cat > > $ > > > > the same is not true if running multiple commands: > > > > $ ./foo; cat > > cat: -: Resource temporarily unavailable > > $ > > > > Why this different behaviour? > > Because it's reset immediately before reading the next line with > readline. > > Andreas. > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint =3D 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC= 1 > "And now for something completely different." Exactly, while in my bug I can do any command I want without resetting it. Only `exec bash` restores it. --=20 Matteo Croce per aspera ad upstream