From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: MinGW build on master fails with Error 127 Date: Sat, 24 Dec 2022 21:27:01 +0200 Message-ID: <83k02g4n7e.fsf@gnu.org> References: <83wn6wr5oz.fsf@gnu.org> <0c9519c9-add7-9fb1-ac7f-2f20e1916d65@bluewin.ch> <83tu20r4y7.fsf@gnu.org> <01b7362d-7d60-3054-5590-d4dbbcda76d7@bluewin.ch> <83r0x4r490.fsf@gnu.org> <837cyh71ft.fsf@gnu.org> <832966a5-bd27-76f9-4757-a8c246eca416@bluewin.ch> <835ye06ex7.fsf@gnu.org> <87sfh424ya.fsf@telefonica.net> <83y1qw4x8w.fsf@gnu.org> <87o7rs22yn.fsf@telefonica.net> <83v8m04un9.fsf@gnu.org> <87cz8820hx.fsf@telefonica.net> <83sfh44t2t.fsf@gnu.org> <878riw1y70.fsf@telefonica.net> <83pmc84qs3.fsf@gnu.org> <87zgbczl3g.fsf@telefonica.net> <87mt7czk1v.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32332"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?utf-8?Q?=C3=93scar?= Fuentes Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 24 20:27:40 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p9ABG-0008Ax-Vz for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Dec 2022 20:27:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p9AAi-0000rC-DI; Sat, 24 Dec 2022 14:27:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p9AAh-0000qu-0g for emacs-devel@gnu.org; Sat, 24 Dec 2022 14:27:03 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p9AAg-00049Y-NJ; Sat, 24 Dec 2022 14:27:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=xEMTWI1gXfHAc+QCx9pisDA6cSmI8oZNLSisovi0H9A=; b=A9AgmmHQE8phuvXXWeWN Owq/gkkTkXsz0MjpNMyHDT50k6Iy86FxevguO5lb350VL5U9vfzPpvHrWfnAIRZ0ISFHtJ4e1V4de EvqR58C78EvhoumL6C/rq+VMILLBIUGve19hT9k/7hiYQSQ2QgEw4sIcAjCTagL9bth9S/Wld30FW I4w7ty9fcvGQn4mIeoTGzvLjWBegYxBtAKMlmHai75zwEOsRYUHEeZGn2lINw5q+1woDCqxHLUFth J2/ifUircaPRt8zwB+RV3IT+I4rjtew5qDtMx4OJsQGnzfxGrJ3X94z2HkToWgiAo4B9frZSCOIE+ B3W3RF9qjCcg2w==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p9AAg-0004LT-4d; Sat, 24 Dec 2022 14:27:02 -0500 In-Reply-To: <87mt7czk1v.fsf@telefonica.net> (message from =?utf-8?Q?=C3=93scar?= Fuentes on Sat, 24 Dec 2022 20:19:24 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301881 Archived-At: > From: Óscar Fuentes > Cc: emacs-devel@gnu.org > Date: Sat, 24 Dec 2022 20:19:24 +0100 > > Óscar Fuentes writes: > > >>> The commit message says "fclose fail during atexit as if they were > >>> already closed" but indeed it doesn't describe a user-visible problem. I > >>> can ask for more details, if you are interested. > >> > >> I am. > > > > Ok, I'll ask the patch author. > > This is his answer: > > Afair it showed an error at exit and exited != 0. Here's the source code of close_stream (after I removed the comments): int close_stream (FILE *stream) { const bool some_pending = (__fpending (stream) != 0); const bool prev_fail = (ferror (stream) != 0); const bool fclose_fail = (fclose (stream) != 0); if (prev_fail || (fclose_fail && (some_pending || errno != EBADF))) { if (! fclose_fail) errno = 0; return EOF; } return 0; } My questions are simple: which of the conditions for the error return actually happened? And what was the value of 'errno' (the code only filters out EBADF)?