Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Mike Frysinger Newsgroups: gnu.bash.bug Subject: Re: bash closes fd twice. Date: Fri, 11 Dec 2015 14:08:56 -0500 Lines: 50 Approved: bug-bash@gnu.org Message-ID: References: <566AD2B1.7040800@case.edu> <566AD878.4000203@redhat.com> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wNT7VBaN1rUIB9jO" X-Trace: usenet.stanford.edu 1449860945 9125 208.118.235.17 (11 Dec 2015 19:09:05 GMT) X-Complaints-To: action@cs.stanford.edu Cc: Yoriyuki Yamagata , bug-bash@gnu.org, chet.ramey@case.edu To: Eric Blake Envelope-to: bug-bash@gnu.org Mail-Followup-To: Eric Blake , chet.ramey@case.edu, Yoriyuki Yamagata , bug-bash@gnu.org Content-Disposition: inline In-Reply-To: <566AD878.4000203@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 140.211.166.183 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:11987 --wNT7VBaN1rUIB9jO Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 11 Dec 2015 07:06, Eric Blake wrote: > On 12/11/2015 06:42 AM, Chet Ramey wrote: > > On 12/11/15 12:40 AM, Yoriyuki Yamagata wrote: > >> Dear list,=20 > >> > >> I found that bash tries to close the same fd twice, consecutively. I= =E2=80=99m using Mac OS X Yosemite, and bash is the newest available (bash-= master from http://tiswww.case.edu/php/chet/bash/bashtop.html yesterday). > >=20 > > That's harmless. >=20 > Only if bash is single-threaded (it is) and if no signal handler can > create fds (that, I'm less sure of). It is absolutely harmful in a > multi-threaded program, or in a program where a signal handler might > open an fd and the signal can occur in the window between the two close()= s. what about loadable bash plugins ? :) -mike --wNT7VBaN1rUIB9jO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWax9IAAoJEEFjO5/oN/WB234P/0sgbVznCS8R0fLYtyA8dJlk BCAH2VjqDuGXI8nV23Bz6jToqMM+lmWSzPNcz1bnlWV1d2OISjlE1G3kN+cWLtKc SJb+RbQTBe/EtijhXy+bJVlFs7XyZ52pbpRZ1PtrVRr06MlewEid7ZXmqHPL1t42 fQ8u3a2Rv6NbGJi3nBlrcuXCirBSz3OhgSOC6SdhP4nXZekXl+JDKLRJZI14yMf5 OTtPXfMuwa5i610OiDqTrC+hqcasZbwaaajl3/BqloIh+Q0cq/fnW3Mbjekly6hz 6otPbfYJEV+NkQObjn/uXu16jTUDkLjbhcHPMzxwENmywoPOtqTvFmEo3H8ju7h0 9GcIltTFktRJpx5asexTuTOv56ArS1+NUlbXLlu29PnDgaQ6yVsODLPSGNM9YBvH 9stPsp8kFa0skOsqI+zjq/UGsI2CehjksD1utFHX5d3dVL7nwvFAOxG5YTWiBCE8 ILrNipWKsDhWi/kTjkubupy4pdozbfU7qykkceEzsisA29NsLkahZn87YQFmP2BL RwUyjTC/PpNeuhNk+da1FKhWU0AKsTPgocM2llm2axfMo3beMl8RbQ/iZhfraWL2 6iUILnIM0tU0KA52R64IHAzM4cgF/4D14Nui3lLW7HoW8Hwg0AzldGWHxfKduOzm XWfXaEkiCg4jzyRsOZaP =NCsl -----END PGP SIGNATURE----- --wNT7VBaN1rUIB9jO--