From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Quang Kien Nguyen Newsgroups: gmane.emacs.devel Subject: Re: MPS: Win64 testers? Date: Wed, 7 Aug 2024 11:32:23 -0700 Message-ID: References: <86h6bxq3p3.fsf@gnu.org> <86sevho61y.fsf@gnu.org> <86ed70o90k.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="00000000000054e6cb061f1c2200" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39704"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, pipcet@protonmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Aug 08 06:38:22 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 1sbuur-000ABV-D7 for ged-emacs-devel@m.gmane-mx.org; Thu, 08 Aug 2024 06:38:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbuuZ-0006Vn-KK; Thu, 08 Aug 2024 00:38:03 -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 1sblSk-00031w-UH for emacs-devel@gnu.org; Wed, 07 Aug 2024 14:32:43 -0400 Original-Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sblSh-0006UU-TG; Wed, 07 Aug 2024 14:32:42 -0400 Original-Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5b01af9b0c9so83353a12.3; Wed, 07 Aug 2024 11:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723055556; x=1723660356; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9dtzuscAFvJIwJ5okm714+V8TuS+s5H6FoIn7qgLgW4=; b=mWk8gC4rlAVZJAiwiYm2kAy+FPc/wbnrzthpYKRXuuMjN1fLxz/x0FVAuZLdgXQqo2 jzJwNYyWIhBj2rXu/edqhrP3OkWoz/sM8+2OohfAeWUdkNyiIvt4rAXhQrN/u3IKLtTH IkX9ry8aPw8hwVlsk6N5HNlLA4Q+61kBkHktGxHjic04nC89sPGdEbk+7RDqaQdPO/H8 jmOPcNWyGv+1WofiHGIxznL/tmVbl4jUW+WsYJV+7t02kcrm27IEtFPtCkxy6Yaatq5b GWxtN2lrC+/klNDs/uDn/6ZD0BGrDN6D9GlKXcKikSbHBOu5/4qO3jA0PNXyGBS3+sQT oinQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723055556; x=1723660356; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9dtzuscAFvJIwJ5okm714+V8TuS+s5H6FoIn7qgLgW4=; b=ov08anek6ULCE30P1DfdY7lTQZn0fy1c3DE/vqqQc9vvluWsqv++BBkbOTS5AHfbbm DS/ND+8UecrKPf2wrFzZ60FK/3UVJKWiLft29PMTEewbcZXet5IGWUXmVhZi41rV6Pfw 59nz3YMfETSYov9IRAxNM/P0Yuq+Ziq7GXj2pd0OsrjbYkR55ytjhn7pIVpH0ccn740Q YIWSrXHmyekK9NcmdFb/SBQ84BWtUYK/q4qI7CQqc7oWXr83WiYHQPR4WgOgdxhvnKvW DYOReYACG5fxlsd4Lv/dM157i/VXn5H6FEXed1OdVFND4IEYarEO5x3dQXZ1LQHkicCS FiFw== X-Gm-Message-State: AOJu0YznKJmh1Yz6UUeUk9KjSi5a9twueiCdlyNPSxq0p0NTwVbkL4qX FaeLbCiAMQzKaXZCZgCcA9Ux1/kBYr6Ubm2hvAxkrff+JZkLTFgc4Y69W7euVDRFees4s4m1GRV 8rt8aSwkyAYtSs4YVAQN8Vtm94XSEutPe X-Google-Smtp-Source: AGHT+IEWrQp3zNJkidw2Np80bipwimIHn4G4zBnHvc9s/4ZktBpG9pLVGrhAL1ciryluByAn5/rljPDPWNicri+t1zs= X-Received: by 2002:a05:6402:5167:b0:5a3:27bd:e264 with SMTP id 4fb4d7f45d1cf-5b7f3cc7ab3mr15285298a12.9.1723055555790; Wed, 07 Aug 2024 11:32:35 -0700 (PDT) In-Reply-To: <86ed70o90k.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=kien.n.quang@gmail.com; helo=mail-ed1-x531.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 08 Aug 2024 00:38:01 -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:322526 Archived-At: --00000000000054e6cb061f1c2200 Content-Type: text/plain; charset="UTF-8" > This is not what I think we need. First, there's no need to change > anything in the MSVCRT build, because AFAIK the current code "just > works" in such a build, both in 32-bit builds and in 64-bit builds. > The problem happens only in UCRT builds. Okay, put a new patch. By the way, the code of using `pfn_SetHandleInformation` has been using by `init_winsock` as well for the same purpose of making the handle not inheritable. So I think we should be pretty safe with this change. > To test that, one would need to demonstrate that the parent Emacs > process can do something with its standard handles without affecting > the same handles of the child process. For example, moving the file > pointer in one process doesn't move it in the other. As another > example, if Emacs's standard output is redirected to a file, and > writing to stdout in the child process writes to that same file, then > the standard output handle _was_ inherited. Yet another possibility > is to use a tool such as ProcessExplorer to show the target of each > handle, in both parent Emacs and its child sub-process, and verify the > target is different. I'm not sure how to redirect Emacs output in Windows. And using ProcExp64, I can confirm that the standard handles (\Device\ConDrv\Input ...) is not refereed by its child processes. Let me know if you want me test other scenarios. --- Kien --00000000000054e6cb061f1c2200 Content-Type: application/octet-stream; name="0001-Use-SetHandleInformation-to-set-NOINHERIT-in-UCRT64.patch" Content-Disposition: attachment; filename="0001-Use-SetHandleInformation-to-set-NOINHERIT-in-UCRT64.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lzk6s15u0 RnJvbSBmYTFlY2JmNGMzMzU4OWM0ZDc1M2UxYWYzODBmYTI5MDJkMmY2NzJmIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBLaWVuIE5ndXllbiA8a2llbi5uLnF1YW5nQGdtYWlsLmNvbT4K RGF0ZTogV2VkLCA3IEF1ZyAyMDI0IDEwOjM5OjM4IC0wNzAwClN1YmplY3Q6IFtQQVRDSF0gVXNl IFNldEhhbmRsZUluZm9ybWF0aW9uIHRvIHNldCBOT0lOSEVSSVQgaW4gVUNSVDY0CgogICAgKiBp bml0X250cHJvYzogVXNlIFNldEhhbmRsZUluZm9ybWF0aW9uIHRvIHNldCBOT0lOSEVSSVQgaW4g VUNSVDY0IAoKLS0tCiBzcmMvdzMyLmMgfCAxMSArKysrKysrKysrKwog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