From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: MPS: Win64 testers? Date: Sun, 28 Jul 2024 13:00:20 +0000 Message-ID: References: <86ttgb1186.fsf@gnu.org> <86le1m24tx.fsf@gnu.org> <86jzh622p4.fsf@gnu.org> <86h6ca1xfz.fsf@gnu.org> <867cd61412.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6270"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 28 16:05:00 2024 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 1sY4WC-0001S1-0o for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Jul 2024 16:05:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sY4Va-0003sc-OT; Sun, 28 Jul 2024 10:04:22 -0400 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 1sY3Vr-0000mx-RS for emacs-devel@gnu.org; Sun, 28 Jul 2024 09:00:37 -0400 Original-Received: from mail-4316.protonmail.ch ([185.70.43.16]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sY3Vp-0004lC-LN; Sun, 28 Jul 2024 09:00:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1722171624; x=1722430824; bh=DSsDQFxCSRi6ScB9/gQi2847xamwAq8mzm6lOYLW444=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=rpPb3jDhkLC3p9aUb3VO7Pjus/ctVp0Le5eKwUV69Zh0r0FevPB53u+J0/OBhOnHp gq/+XTf5k0YcYgXEJXmroGLAjPhlkjWbk/BOrPaJViYJR/eT7wbejliRpp5BU2Cqh2 NboON56LEHBvpOwfrcsz+aQyoRrh8QnVlP7M+VthblnIMQpyheKXhs/i99vxoJ4p2+ ZgS1BJ7Q1Y45FBV9p2ouYtk66FsKLug8e00R8+d2w1zi6BzTKLO3/KvJ2KaKh/VAWX zEcWXhZ88Qa9NKqpb50e2lp0QyPTaJ1bal+i/s7wSwSS7usCfpU14TazRZywVhM0DS NukK4YhIB61Xw== In-Reply-To: <867cd61412.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 1a62f3545256edcd481dc9c8f3aa7541f6d7c592 Received-SPF: pass client-ip=185.70.43.16; envelope-from=pipcet@protonmail.com; helo=mail-4316.protonmail.ch X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 28 Jul 2024 10:04:20 -0400 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:322166 Archived-At: On Sunday, July 28th, 2024 at 05:25, Eli Zaretskii wrote: > > Date: Sat, 27 Jul 2024 20:22:34 +0000 > > From: Pip Cet pipcet@protonmail.com > > Cc: emacs-devel@gnu.org > > It's been that way since 2004, if the git history is to be believed. >=20 > I guess they have some unsolved issues with the standard streams, > which is why they don't dare reusing their slots. Which means closing > these standard streams is a no-no on Wine. I don't know. I suspect they just never thought (20 years ago!) that anyone= would want to close a standard stream. Any idea what UCRT does? > But if this is what Wine does, then what do you get from the various > fprintf debugging code in Emacs? For example, if you build with the > "--enable-checking=3D'yes,glyphs'" option, you get the trace-redisplay > command which outputs debugging information about redisplay to stderr, > and also the dump-glyph-matrix command which prints the glyph matrix > to stderr. Do these print-outs still work although stderr was closed > in init_ntproc? I tried with GDB, and fprintf(stderr, ...) stops working in init_ntproc. > Or maybe under Wine closing a standard stream has no effect, and the > stream remains open? But then why does close_output_streams reports > errors? The FILE object remains assigned to its FD but loses its writable/readable = flag, so fwrite returns -1/EBADF. fclose() returns -1 (though it's spelled= EOF in the source code) and doesn't set errno. As for the code in question, if I understand it correctly, the current Wind= ows idiom would be simply (I assume _open_osfhandle clears the flag?): SetHandleInformation (GetStdHandle (STD_INPUT_HANDLE), HANDLE_FLAG_INHERIT,= 0); The version information for availability of "SetHandleInformation" and "Dup= licateHandle" is the same, so any idea why we're not just doing that, or is= it just lost in history? Pip