From unknown Thu Aug 14 21:46:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#6430 <6430@debbugs.gnu.org> To: bug#6430 <6430@debbugs.gnu.org> Subject: Status: Emacs WINDOWS truncates exit status of processes to 8 bits Reply-To: bug#6430 <6430@debbugs.gnu.org> Date: Fri, 15 Aug 2025 04:46:12 +0000 retitle 6430 Emacs WINDOWS truncates exit status of processes to 8 bits reassign 6430 emacs submitter 6430 macross84@ozu.es severity 6430 wishlist tag 6430 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 15 13:28:40 2010 Received: (at submit) by debbugs.gnu.org; 15 Jun 2010 17:28:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOZwF-00043I-CM for submit@debbugs.gnu.org; Tue, 15 Jun 2010 13:28:40 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOZp0-0003zr-FK for submit@debbugs.gnu.org; Tue, 15 Jun 2010 13:21:11 -0400 Received: from lists.gnu.org ([199.232.76.165]:44010) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OOZov-00020F-Nu for submit@debbugs.gnu.org; Tue, 15 Jun 2010 13:21:05 -0400 Received: from [140.186.70.92] (port=39094 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOZot-0000i9-Ns for bug-gnu-emacs@gnu.org; Tue, 15 Jun 2010 13:21:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.4 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOZos-0000pX-Ck for bug-gnu-emacs@gnu.org; Tue, 15 Jun 2010 13:21:03 -0400 Received: from mx2.ozu.es ([194.30.33.37]:52017 helo=mx2-out.ozu.es) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOZos-0000p4-7v for bug-gnu-emacs@gnu.org; Tue, 15 Jun 2010 13:21:02 -0400 Received: from correo.ozu.es (webmail1-privado.ozu.es [10.0.6.40]) by mx2-out.ozu.es (Postfix) with SMTP id 8709D4BDB11 for ; Tue, 15 Jun 2010 19:20:59 +0200 (CEST) Received: from 80.58.205.52 (proxying for 83.51.174.34) (SquirrelMail authenticated user macross84@ozu.es) by correo.ozu.es with HTTP; Tue, 15 Jun 2010 19:20:59 +0200 (CEST) Message-ID: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> Date: Tue, 15 Jun 2010 19:20:59 +0200 (CEST) Subject: Emacs WINDOWS truncates exit status of processes to 8 bits From: macross84@ozu.es To: bug-gnu-emacs@gnu.org User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-Priority: 3 Importance: Normal Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: FreeBSD 6.x (1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 15 Jun 2010 13:28:38 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) We all know this is a stupid behaviour Unix programs ported to windows are going to return exit statuses that go in 8 bits, but emacs truncating the exit status to 8 bits by force is making to lose 24 bits of the exit status of native windows programs. -------------------------------------------------------------------------= ------------------- Busca, compara... pero busca en Qu=E9! Desc=FAbrelo en http://buscar.que.es/ -------------------------------------------------------------------------= ------------------- Correo enviado desde http://www.ozu.es From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 13 22:48:33 2016 Received: (at 6430) by debbugs.gnu.org; 14 Jun 2016 02:48:33 +0000 Received: from localhost ([127.0.0.1]:39479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCeP3-0003hQ-C6 for submit@debbugs.gnu.org; Mon, 13 Jun 2016 22:48:33 -0400 Received: from mail-oi0-f48.google.com ([209.85.218.48]:34483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCeP1-0003hD-CY for 6430@debbugs.gnu.org; Mon, 13 Jun 2016 22:48:31 -0400 Received: by mail-oi0-f48.google.com with SMTP id d132so133092945oig.1 for <6430@debbugs.gnu.org>; Mon, 13 Jun 2016 19:48:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:cc; bh=P+4TvqtcAyRhgsAI51U96F9WPEfa6uok8klvyof3eW4=; b=hMr/6s1BumW694JFcQ/fTQR8gY44YH6czQpNjkPJIC5s97K59lOoSUN4UaiDMGrTQq QZYTQsrySUn4PkyLemDfbPl1pkaL1ZDv1IGZ6iS+JUwII2/Ch4sJycrGY/z8QicmKDuc qMs86irMLYx7KP8Ltlcx4hiC5UIqegXCI1qB9CeF16RqsV02L5Nde1lmSr+WJvhbff3x aKNMh4ZWQDD+OHNY4xLU7P5ETACJoe9/x1lr9BQzafac+mY2fD8RWC9nJrn1wzGVDSzO t5/SAzoZPb379d6DK1qcm/tKt1braVyHZSfQOYrJAQFjJ2yCCOk3wtyJC0s18l0vCl6d 5O+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to:cc; bh=P+4TvqtcAyRhgsAI51U96F9WPEfa6uok8klvyof3eW4=; b=drgwotF+NhdJ2NswDuK1a6EsUncBBcyFPMjouT81+4UoRwZYxi+4n61CDxtZUPNyzI fPqriKTnNqKFrZcTaRSPr6MKH1fLmyFAtLB00dZJLuzaTdJ/w6HRFwXpvJBhl3/WUvyf FT6gcrLdM+HomX/d+udHqS3rF4MYPDaCyjl8lHGwhAbfbLAuQMibS01hjHZ9tWV5+M49 1HpYri7imTb3rXVp2Sy5Kjvhj3Un0w3VPL5SEa2+e5TL1N46BippA9fD8m+pNbGEFCOy ZGrnQrgmHrbDmzOJ1nIRgSMR2RaU2sAnpUXJf/uChg9SexylmZxreKfHXdct7mSpyUNg 2Bbg== X-Gm-Message-State: ALyK8tLKPZSh/uxMDf8KwYPD/B8J53f7nt7ztvhPdlZMvtAj6Khkw1BeHZ0dFbQEMcRt3td+LaGUErfK07ulLA== X-Received: by 10.157.38.185 with SMTP id l54mr9793328otb.112.1465872505948; Mon, 13 Jun 2016 19:48:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.5.168 with HTTP; Mon, 13 Jun 2016 19:48:25 -0700 (PDT) From: Noam Postavsky Date: Mon, 13 Jun 2016 22:48:25 -0400 X-Google-Sender-Auth: j3GYmqhqnxE0YuvrKvSTaQu6uP4 Message-ID: Subject: Emacs WINDOWS truncates exit status of processes to 8 bits To: 6430@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 6430 Cc: macross84@ozu.es X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) tag 6430 + wontfix quit Problem is 32bit Emacs has 28 bit integers, so there's no way to fit the whole exit code anyway. At least truncating to 8 bits is portable. Plus, isn't it against Emacs policy to provide features on non-Free platforms before Free ones? From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 14 09:07:54 2016 Received: (at submit) by debbugs.gnu.org; 14 Jun 2016 13:07:55 +0000 Received: from localhost ([127.0.0.1]:39688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCo4Q-0006Fv-OI for submit@debbugs.gnu.org; Tue, 14 Jun 2016 09:07:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCo4P-0006Fi-PB for submit@debbugs.gnu.org; Tue, 14 Jun 2016 09:07:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCo4J-00071A-Sz for submit@debbugs.gnu.org; Tue, 14 Jun 2016 09:07:48 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46397) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCo4J-000714-Pv for submit@debbugs.gnu.org; Tue, 14 Jun 2016 09:07:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCo4H-0006q6-MA for bug-gnu-emacs@gnu.org; Tue, 14 Jun 2016 09:07:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCo4E-0006zd-Fm for bug-gnu-emacs@gnu.org; Tue, 14 Jun 2016 09:07:45 -0400 Received: from plane.gmane.org ([80.91.229.3]:36100) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCo4E-0006zN-8z for bug-gnu-emacs@gnu.org; Tue, 14 Jun 2016 09:07:42 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bCo4B-0001MH-Ro for bug-gnu-emacs@gnu.org; Tue, 14 Jun 2016 15:07:39 +0200 Received: from 141.red-217-125-182.dynamicip.rima-tde.net ([217.125.182.141]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Jun 2016 15:07:39 +0200 Received: from ofv by 141.red-217-125-182.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Jun 2016 15:07:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: =?utf-8?Q?=C3=93scar_Fuentes?= Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits Date: Tue, 14 Jun 2016 15:07:24 +0200 Lines: 18 Message-ID: <87r3bzkjg3.fsf@wanadoo.es> References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 141.red-217-125-182.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) Cancel-Lock: sha1:pJfaRxz9MTVWnb0k6qvRU7UM5NE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) Noam Postavsky writes: > Problem is 32bit Emacs has 28 bit integers, so there's no way to fit > the whole exit code anyway. There is -with-wide-int for 32bit Emacs and it can be compiled as a 64bit executable. > At least truncating to 8 bits is portable. Imposing the limits of one platform on another is the contrary of being portable. > Plus, isn't it against Emacs policy to provide features on non-Free > platforms before Free ones? Nobody is asking for more than 8 bits of exit status on *nix. There is no competition here about who has the wider exit status. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 14 10:34:43 2016 Received: (at 6430) by debbugs.gnu.org; 14 Jun 2016 14:34:43 +0000 Received: from localhost ([127.0.0.1]:40738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCpQR-0000AK-04 for submit@debbugs.gnu.org; Tue, 14 Jun 2016 10:34:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57105) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCpQP-0000A7-Cz for 6430@debbugs.gnu.org; Tue, 14 Jun 2016 10:34:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCpQG-0004HB-1f for 6430@debbugs.gnu.org; Tue, 14 Jun 2016 10:34:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCpPq-00044O-BD; Tue, 14 Jun 2016 10:34:06 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4519 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bCpPp-0006Ut-GR; Tue, 14 Jun 2016 10:34:05 -0400 Date: Tue, 14 Jun 2016 17:35:00 +0300 Message-Id: <831t3zg7or.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: (message from Noam Postavsky on Mon, 13 Jun 2016 22:48:25 -0400) Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 6430 Cc: macross84@ozu.es, 6430@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Noam Postavsky > Date: Mon, 13 Jun 2016 22:48:25 -0400 > Cc: macross84@ozu.es > > Problem is 32bit Emacs has 28 bit integers, so there's no way to fit > the whole exit code anyway. At least truncating to 8 bits is portable. > Plus, isn't it against Emacs policy to provide features on non-Free > platforms before Free ones? All the above is true, but I don't understand the original complaint. Emacs doesn't truncate exit status of subprocesses in any way, it retrieves the full value of the status, and then reformats it according to what the Posix-style WIF* macros (which Emacs uses elsewhere) expect. No information is lost during this reformatting, see the implementation of waitpid in w32proc.c. Currently, we only report SIGINT in the WSTOPSIG macro, but that's only because no one ever needed anything else; if needed, we could also report SIGSEGV there. IOW, I see no problem here to begin with. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 14 17:48:30 2016 Received: (at 6430) by debbugs.gnu.org; 14 Jun 2016 21:48:30 +0000 Received: from localhost ([127.0.0.1]:40915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCwCE-0006Yq-AN for submit@debbugs.gnu.org; Tue, 14 Jun 2016 17:48:30 -0400 Received: from mail-oi0-f43.google.com ([209.85.218.43]:35870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCwCC-0006Ye-EQ for 6430@debbugs.gnu.org; Tue, 14 Jun 2016 17:48:28 -0400 Received: by mail-oi0-f43.google.com with SMTP id p204so5651240oih.3 for <6430@debbugs.gnu.org>; Tue, 14 Jun 2016 14:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=kXjSEpH6LOtVpMUKppFEIPX8t0mk0I1IMBT054m2hHI=; b=EkMsWBSsrrSbXWws21y5iKFDu3e5jBP2uw1vgUNmEOX/Mt1p32aG663ujAVjZEv95k tMAs0TyJtnG25ZyclvGsw9ZgFZCH+QiuNWgQpOUQXgTJaon0pihvyVjZ1OY8y76TRnnx lZbWtiBULDqXxgF/b2CbrZCJ4UzJu5nqxE78QCpZ29SOugIk7qOPMNspoJjg6JV38iDf rJAtBwjVMSIH34GN4++QC1ogtqabAVUgl0IJNNjcWSujeOIqBjDoF6Ep1/ziN8sQJoP5 mnAqXcvINuYebyCgNP7TSq0W3+2pkOQtdHjvQ3W6aX7id6VIHdKrerdMbS7yEwlskoox 2O4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=kXjSEpH6LOtVpMUKppFEIPX8t0mk0I1IMBT054m2hHI=; b=XR3qWdq4RuTFOC0Y/oUCDXrbxeU646ME5a/JMn2lKrUEJWGSaODgkgcVQ6sXu5dc7p r98rORxvuwvHUc1aQq2KJuWvWwPk0pmyLZjPqIE9t+xR8lma7eHfPAEjYvLlcZzf2egU yV4vUqnJmWjSJG1+HiQNCrlQiXVdlyopswW6xqDnSu9RNFCGwjuGcu35HcTB88lW06rt qTs1ts5S37Nc+pEv5CeXk/RIdVVtECi27hZxfu5ehCxthUy9tgmDal8a79k8GGJBRIoW V0JS86mMpW6B5SrAdhtRTdAzvKNdkENa8EPU5g34J0mDsjwRQC9XMCmedO8UdA64cOGH bIOA== X-Gm-Message-State: ALyK8tKDSE/LeQrBVmLyAaJ13GSwjh91qEke/3G6gsX5yR1qSzkILKfrD/QIGwTOrimQ19UaXu7WiCSI1a6uYQ== X-Received: by 10.157.1.107 with SMTP id 98mr12550728otu.17.1465940902818; Tue, 14 Jun 2016 14:48:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.5.168 with HTTP; Tue, 14 Jun 2016 14:48:22 -0700 (PDT) In-Reply-To: <831t3zg7or.fsf@gnu.org> References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> From: Noam Postavsky Date: Tue, 14 Jun 2016 17:48:22 -0400 X-Google-Sender-Auth: GjdV-ltlfhkVfmxuyswI_P6gVvs Message-ID: Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 6430 Cc: macross84@ozu.es, 6430@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Tue, Jun 14, 2016 at 10:35 AM, Eli Zaretskii wrote: > All the above is true, but I don't understand the original complaint. My understanding of the original complaint is that if you compile the program below: #include int main(int argc, char *argv[]) { return atoi(argv[1]); } /* (call-process (expand-file-name "exit-arg1.exe") nil nil nil "300") ;=> 44 */ To lisp programs the exit status gets truncated to 8 bits, whereas running from cmd.exe: C:\Users\npostavs\src\emacs\bug-6430-w32-exit-rc>exit-arg1.exe 300 C:\Users\npostavs\src\emacs\bug-6430-w32-exit-rc>echo %errorlevel% 300 > Emacs doesn't truncate exit status of subprocesses in any way, it > retrieves the full value of the status, and then reformats it > according to what the Posix-style WIF* macros (which Emacs uses > elsewhere) expect. No information is lost during this reformatting, > see the implementation of waitpid in w32proc.c. Not really sure what this reformatting is about, but I think the point is that the original value does not return to lisp. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 14 22:39:10 2016 Received: (at 6430) by debbugs.gnu.org; 15 Jun 2016 02:39:10 +0000 Received: from localhost ([127.0.0.1]:41032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bD0jV-0001XZ-Sq for submit@debbugs.gnu.org; Tue, 14 Jun 2016 22:39:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bD0jU-0001XL-0T for 6430@debbugs.gnu.org; Tue, 14 Jun 2016 22:39:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bD0jN-0005JO-Vi for 6430@debbugs.gnu.org; Tue, 14 Jun 2016 22:39:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36822) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bD0jI-0005IX-42; Tue, 14 Jun 2016 22:38:56 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1256 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bD0jG-0000Fn-A4; Tue, 14 Jun 2016 22:38:54 -0400 Date: Wed, 15 Jun 2016 05:39:50 +0300 Message-Id: <83d1njdvk9.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: (message from Noam Postavsky on Tue, 14 Jun 2016 17:48:22 -0400) Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 6430 Cc: macross84@ozu.es, 6430@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Noam Postavsky > Date: Tue, 14 Jun 2016 17:48:22 -0400 > Cc: 6430@debbugs.gnu.org, macross84@ozu.es > > > Emacs doesn't truncate exit status of subprocesses in any way, it > > retrieves the full value of the status, and then reformats it > > according to what the Posix-style WIF* macros (which Emacs uses > > elsewhere) expect. No information is lost during this reformatting, > > see the implementation of waitpid in w32proc.c. > > Not really sure what this reformatting is about, but I think the point > is that the original value does not return to lisp. Why is that a problem? The important information that I thought this was about is in the upper 4 bits of the status, and it doesn't get lost -- it's passed back to Emacs as the signal (if any) that caused the subprocess to exit. If there are any important use cases with programs that return status above 255, we can easily change the definition of WEXITSTATUS for Windows. But I have yet to see a real-life example of such a program, or any complaint about the current WEXITSTATUS definition in Emacs. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 08:30:30 2016 Received: (at 6430) by debbugs.gnu.org; 15 Jun 2016 12:30:30 +0000 Received: from localhost ([127.0.0.1]:41233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bD9xl-0002Ni-Pp for submit@debbugs.gnu.org; Wed, 15 Jun 2016 08:30:29 -0400 Received: from relaycp03.dominioabsoluto.net ([217.116.26.84]:53713) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bD9xj-0002NT-SJ for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 08:30:28 -0400 Received: from smtp.movistar.es (smtp21.acens.net [86.109.99.145]) by relaycp03.dominioabsoluto.net (Postfix) with ESMTP id 7D4DABFA3F7; Wed, 15 Jun 2016 14:30:21 +0200 (CEST) X-CTCH-RefID: str=0001.0A0B0201.57614A5D.0187, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (217.125.182.141) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 574060E7013D8B88; Wed, 15 Jun 2016 12:30:21 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: Eli Zaretskii Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> Date: Wed, 15 Jun 2016 14:30:20 +0200 In-Reply-To: <83d1njdvk9.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 15 Jun 2016 05:39:50 +0300") Message-ID: <87mvmmk52b.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 6430 Cc: macross84@ozu.es, 6430@debbugs.gnu.org, Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: >> Not really sure what this reformatting is about, but I think the point >> is that the original value does not return to lisp. > > Why is that a problem? Because Emacs is reporting something false? > The important information that I thought this was about is in the > upper 4 bits of the status, and it doesn't get lost -- it's passed > back to Emacs as the signal (if any) that caused the subprocess to > exit. > > If there are any important use cases with programs that return status > above 255, we can easily change the definition of WEXITSTATUS for > Windows. But I have yet to see a real-life example of such a program, > or any complaint about the current WEXITSTATUS definition in Emacs. You are fortunate enough to live in a world of applications ported from *nix :-) (and so do I, for the most part.) When a Windows application calls an API that fails and the application has no method for recovering from the error, it is customary to exit with the error code of the API (usually obtained with GetLastError). From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 11:01:43 2016 Received: (at 6430) by debbugs.gnu.org; 15 Jun 2016 15:01:43 +0000 Received: from localhost ([127.0.0.1]:42410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDCK7-0006Cr-FJ for submit@debbugs.gnu.org; Wed, 15 Jun 2016 11:01:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDCK6-0006Cg-Hq for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 11:01:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDCJx-0007D9-0I for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 11:01:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDCJw-0007Cy-Ti; Wed, 15 Jun 2016 11:01:32 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1618 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bDCJu-0003x5-K9; Wed, 15 Jun 2016 11:01:31 -0400 Date: Wed, 15 Jun 2016 18:02:27 +0300 Message-Id: <8337oeebr0.fsf@gnu.org> From: Eli Zaretskii To: =?iso-8859-1?Q?=D3scar?= Fuentes In-reply-to: <87mvmmk52b.fsf@wanadoo.es> (message from =?iso-8859-1?Q?=D3s?= =?iso-8859-1?Q?car?= Fuentes on Wed, 15 Jun 2016 14:30:20 +0200) Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 6430 Cc: macross84@ozu.es, 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Óscar Fuentes > Cc: Noam Postavsky , macross84@ozu.es, 6430@debbugs.gnu.org > Date: Wed, 15 Jun 2016 14:30:20 +0200 > > Eli Zaretskii writes: > > >> Not really sure what this reformatting is about, but I think the point > >> is that the original value does not return to lisp. > > > > Why is that a problem? > > Because Emacs is reporting something false? Only if the value is greater than 255. > > The important information that I thought this was about is in the > > upper 4 bits of the status, and it doesn't get lost -- it's passed > > back to Emacs as the signal (if any) that caused the subprocess to > > exit. > > > > If there are any important use cases with programs that return status > > above 255, we can easily change the definition of WEXITSTATUS for > > Windows. But I have yet to see a real-life example of such a program, > > or any complaint about the current WEXITSTATUS definition in Emacs. > > You are fortunate enough to live in a world of applications ported from > *nix :-) (and so do I, for the most part.) Emacs does more than that. To see that, interrupt a console program with Ctrl-C, and then display its exit status using %ERRORLEVEL%. Then do the same inside Emacs and compare the results. That's what I thought the OP was alluding to. > When a Windows application calls an API that fails and the application > has no method for recovering from the error, it is customary to exit > with the error code of the API (usually obtained with GetLastError). GetLastError has nothing to do with this, because it's not an API that fails, it's a program that exits with some arbitrary exit code. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 11:16:07 2016 Received: (at 6430) by debbugs.gnu.org; 15 Jun 2016 15:16:07 +0000 Received: from localhost ([127.0.0.1]:42414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDCY2-0006XC-QX for submit@debbugs.gnu.org; Wed, 15 Jun 2016 11:16:06 -0400 Received: from relaycp03.dominioabsoluto.net ([217.116.26.84]:42578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDCXx-0006WP-IF for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 11:16:05 -0400 Received: from smtp.movistar.es (smtp21.acens.net [86.109.99.145]) by relaycp03.dominioabsoluto.net (Postfix) with ESMTP id 3E791BFA4C3; Wed, 15 Jun 2016 17:15:55 +0200 (CEST) X-CTCH-RefID: str=0001.0A0B0201.5761712B.00D0, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (217.125.182.141) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 574060E7013FD744; Wed, 15 Jun 2016 15:15:55 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: Eli Zaretskii Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> <8337oeebr0.fsf@gnu.org> Date: Wed, 15 Jun 2016 17:15:54 +0200 In-Reply-To: <8337oeebr0.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 15 Jun 2016 18:02:27 +0300") Message-ID: <87inxajxed.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 6430 Cc: macross84@ozu.es, 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: >> When a Windows application calls an API that fails and the application >> has no method for recovering from the error, it is customary to exit >> with the error code of the API (usually obtained with GetLastError). > > GetLastError has nothing to do with this, because it's not an API that > fails, it's a program that exits with some arbitrary exit code. if( ! CreateProcess(....) ) { DWORD ec = GetLastError(); // do some cleanup ExitProcess(ec); } The program exits with the error code obtained with GetLastError, which is a 32 bit number. The program may have its own exit codes, which can be wider than 8 bits. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 11:39:21 2016 Received: (at 6430) by debbugs.gnu.org; 15 Jun 2016 15:39:21 +0000 Received: from localhost ([127.0.0.1]:42426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDCuX-000746-Ca for submit@debbugs.gnu.org; Wed, 15 Jun 2016 11:39:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDCuW-00073u-F2 for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 11:39:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDCuO-00017J-51 for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 11:39:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDCuO-00017C-1E; Wed, 15 Jun 2016 11:39:12 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2012 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bDCuM-0001QG-Ry; Wed, 15 Jun 2016 11:39:11 -0400 Date: Wed, 15 Jun 2016 18:40:07 +0300 Message-Id: <83y466cvfs.fsf@gnu.org> From: Eli Zaretskii To: =?iso-8859-1?Q?=D3scar?= Fuentes In-reply-to: <87inxajxed.fsf@wanadoo.es> (message from =?iso-8859-1?Q?=D3s?= =?iso-8859-1?Q?car?= Fuentes on Wed, 15 Jun 2016 17:15:54 +0200) Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> <8337oeebr0.fsf@gnu.org> <87inxajxed.fsf@wanadoo.es> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 6430 Cc: macross84@ozu.es, 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Óscar Fuentes > Cc: npostavs@users.sourceforge.net, macross84@ozu.es, 6430@debbugs.gnu.org > Date: Wed, 15 Jun 2016 17:15:54 +0200 > > > GetLastError has nothing to do with this, because it's not an API that > > fails, it's a program that exits with some arbitrary exit code. > > if( ! CreateProcess(....) ) { > DWORD ec = GetLastError(); > // do some cleanup > ExitProcess(ec); > } That's not how Emacs does that, see waitpid and its callers. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 13:14:35 2016 Received: (at 6430) by debbugs.gnu.org; 15 Jun 2016 17:14:35 +0000 Received: from localhost ([127.0.0.1]:42545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDEOh-0002eW-Bt for submit@debbugs.gnu.org; Wed, 15 Jun 2016 13:14:35 -0400 Received: from relaycp03.dominioabsoluto.net ([217.116.26.84]:56882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDEOf-0002eI-Kj for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 13:14:34 -0400 Received: from smtp.movistar.es (smtp21.acens.net [86.109.99.145]) by relaycp03.dominioabsoluto.net (Postfix) with ESMTP id 727F4BFA1DC; Wed, 15 Jun 2016 19:14:26 +0200 (CEST) X-CTCH-RefID: str=0001.0A0B0203.57618CF2.013D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (217.125.182.141) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 574060E70141AC63; Wed, 15 Jun 2016 17:14:26 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: Eli Zaretskii Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> <8337oeebr0.fsf@gnu.org> <87inxajxed.fsf@wanadoo.es> <83y466cvfs.fsf@gnu.org> Date: Wed, 15 Jun 2016 19:14:25 +0200 In-Reply-To: <83y466cvfs.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 15 Jun 2016 18:40:07 +0300") Message-ID: <87eg7yjrwu.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 6430 Cc: macross84@ozu.es, 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: >> > GetLastError has nothing to do with this, because it's not an API that >> > fails, it's a program that exits with some arbitrary exit code. >> >> if( ! CreateProcess(....) ) { >> DWORD ec = GetLastError(); >> // do some cleanup >> ExitProcess(ec); >> } > > That's not how Emacs does that, see waitpid and its callers. Once again, we are miscommunicating. AFAIU this is about Emacs calling a process foo which returns an exit code larger than 255, but Emacs only reports the lower 8 bits to the Elisp function that started the process. In w32proc.c waitpid: if (!GetExitCodeProcess (wait_hnd[active], &retval)) ... retval <<= 8; Windows applications make use of the full 32 bits of the return code. With Emacs it is impossible to know those larger-than-255 exit codes. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 13:32:00 2016 Received: (at 6430) by debbugs.gnu.org; 15 Jun 2016 17:32:00 +0000 Received: from localhost ([127.0.0.1]:42556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDEfY-000382-96 for submit@debbugs.gnu.org; Wed, 15 Jun 2016 13:32:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDEfW-00037m-UX for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 13:31:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDEfO-0000ID-LN for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 13:31:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDEfO-0000I2-IS; Wed, 15 Jun 2016 13:31:50 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2111 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bDEfM-000409-FV; Wed, 15 Jun 2016 13:31:49 -0400 Date: Wed, 15 Jun 2016 20:32:43 +0300 Message-Id: <83shwecq84.fsf@gnu.org> From: Eli Zaretskii To: =?iso-8859-1?Q?=D3scar?= Fuentes In-reply-to: <87eg7yjrwu.fsf@wanadoo.es> (message from =?iso-8859-1?Q?=D3s?= =?iso-8859-1?Q?car?= Fuentes on Wed, 15 Jun 2016 19:14:25 +0200) Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> <8337oeebr0.fsf@gnu.org> <87inxajxed.fsf@wanadoo.es> <83y466cvfs.fsf@gnu.org> <87eg7yjrwu.fsf@wanadoo.es> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 6430 Cc: macross84@ozu.es, 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Óscar Fuentes > Cc: npostavs@users.sourceforge.net, macross84@ozu.es, 6430@debbugs.gnu.org > Date: Wed, 15 Jun 2016 19:14:25 +0200 > > Eli Zaretskii writes: > > >> > GetLastError has nothing to do with this, because it's not an API that > >> > fails, it's a program that exits with some arbitrary exit code. > >> > >> if( ! CreateProcess(....) ) { > >> DWORD ec = GetLastError(); > >> // do some cleanup > >> ExitProcess(ec); > >> } > > > > That's not how Emacs does that, see waitpid and its callers. > > Once again, we are miscommunicating. AFAIU this is about Emacs calling a > process foo which returns an exit code larger than 255, but Emacs only > reports the lower 8 bits to the Elisp function that started the process. > > In w32proc.c waitpid: > > if (!GetExitCodeProcess (wait_hnd[active], &retval)) > ... > retval <<= 8; > > Windows applications make use of the full 32 bits of the return code. > With Emacs it is impossible to know those larger-than-255 exit codes. But not because of the code you cite: the 8-bit left shift just means we can report 24 bits out of 32. And all of that is completely unrelated to GetLastError, because errors in starting the subprocess are not reported via waitpid. Once again, if this is important (I don't think so), we can redefine WEXITSTATUS etc. macros to keep all the 32 bits of the exit status (actually, the top 2 bits are reserved, so only 30 bits can be used). Feel free to submit patches to that effect if you like. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 13:36:26 2016 Received: (at 6430) by debbugs.gnu.org; 15 Jun 2016 17:36:26 +0000 Received: from localhost ([127.0.0.1]:42560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDEjp-0003IB-S3 for submit@debbugs.gnu.org; Wed, 15 Jun 2016 13:36:26 -0400 Received: from smtp08.acens.net ([86.109.99.132]:33640 helo=smtp.movistar.es) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDEjn-0003Ht-1i for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 13:36:24 -0400 X-CTCH-RefID: str=0001.0A0B0206.57619210.0021, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (217.125.182.141) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 5746319D012A29F0; Wed, 15 Jun 2016 17:36:16 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: Eli Zaretskii Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> <8337oeebr0.fsf@gnu.org> <87inxajxed.fsf@wanadoo.es> <83y466cvfs.fsf@gnu.org> <87eg7yjrwu.fsf@wanadoo.es> <83shwecq84.fsf@gnu.org> Date: Wed, 15 Jun 2016 19:36:14 +0200 In-Reply-To: <83shwecq84.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 15 Jun 2016 20:32:43 +0300") Message-ID: <87a8imjqwh.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 6430 Cc: macross84@ozu.es, 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Eli Zaretskii writes: >> From: =C3=93scar Fuentes >> Cc: npostavs@users.sourceforge.net, macross84@ozu.es, 6430@debbugs.gnu= .org >> Date: Wed, 15 Jun 2016 19:14:25 +0200 >>=20 >> Eli Zaretskii writes: >>=20 >> >> > GetLastError has nothing to do with this, because it's not an API t= hat >> >> > fails, it's a program that exits with some arbitrary exit code. >> >>=20 >> >> if( ! CreateProcess(....) ) { >> >> DWORD ec =3D GetLastError(); >> >> // do some cleanup >> >> ExitProcess(ec); >> >> } >> > >> > That's not how Emacs does that, see waitpid and its callers. >>=20 >> Once again, we are miscommunicating. AFAIU this is about Emacs calling a >> process foo which returns an exit code larger than 255, but Emacs only >> reports the lower 8 bits to the Elisp function that started the process. >>=20 >> In w32proc.c waitpid: >>=20 >> if (!GetExitCodeProcess (wait_hnd[active], &retval)) >> ... >> retval <<=3D 8; >>=20 >> Windows applications make use of the full 32 bits of the return code. >> With Emacs it is impossible to know those larger-than-255 exit codes. > > But not because of the code you cite: the 8-bit left shift just means > we can report 24 bits out of 32. And all of that is completely > unrelated to GetLastError, because errors in starting the subprocess > are not reported via waitpid. GetLastError on my example was on the *called* process, not on Emacs. > Once again, if this is important (I don't think so), we can redefine > WEXITSTATUS etc. macros to keep all the 32 bits of the exit status > (actually, the top 2 bits are reserved, so only 30 bits can be used). When using --with-wide-int (or when running on Windows 64bits) we have the full 32 bits, right? From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 13:41:49 2016 Received: (at control) by debbugs.gnu.org; 15 Jun 2016 17:41:49 +0000 Received: from localhost ([127.0.0.1]:42564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDEp3-0003Pl-Hk for submit@debbugs.gnu.org; Wed, 15 Jun 2016 13:41:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDEp2-0003PY-3o for control@debbugs.gnu.org; Wed, 15 Jun 2016 13:41:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDEow-0003w4-5E for control@debbugs.gnu.org; Wed, 15 Jun 2016 13:41:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDEow-0003w0-2C for control@debbugs.gnu.org; Wed, 15 Jun 2016 13:41:42 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1bDEov-0005bp-LG for control@debbugs.gnu.org; Wed, 15 Jun 2016 13:41:41 -0400 Subject: control message for bug 6430 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Wed, 15 Jun 2016 13:41:41 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) severity 6430 wishlist tag 6430 - wontfix From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 14:03:49 2016 Received: (at 6430) by debbugs.gnu.org; 15 Jun 2016 18:03:49 +0000 Received: from localhost ([127.0.0.1]:42569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDFAL-0005a9-Da for submit@debbugs.gnu.org; Wed, 15 Jun 2016 14:03:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDFAJ-0005Zu-23 for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 14:03:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDFAA-0001H4-24 for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 14:03:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDFA9-0001Gq-VK; Wed, 15 Jun 2016 14:03:37 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2126 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bDFA5-0000bH-EP; Wed, 15 Jun 2016 14:03:36 -0400 Date: Wed, 15 Jun 2016 21:04:27 +0300 Message-Id: <83r3bycor8.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?=C3=93scar?= Fuentes In-reply-to: <87a8imjqwh.fsf@wanadoo.es> (message from =?utf-8?Q?=C3=93sca?= =?utf-8?Q?r?= Fuentes on Wed, 15 Jun 2016 19:36:14 +0200) Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> <8337oeebr0.fsf@gnu.org> <87inxajxed.fsf@wanadoo.es> <83y466cvfs.fsf@gnu.org> <87eg7yjrwu.fsf@wanadoo.es> <83shwecq84.fsf@gnu.org> <87a8imjqwh.fsf@wanadoo.es> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 6430 Cc: macross84@ozu.es, 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Óscar Fuentes > Cc: npostavs@users.sourceforge.net, macross84@ozu.es, 6430@debbugs.gnu.org > Date: Wed, 15 Jun 2016 19:36:14 +0200 > > > Once again, if this is important (I don't think so), we can redefine > > WEXITSTATUS etc. macros to keep all the 32 bits of the exit status > > (actually, the top 2 bits are reserved, so only 30 bits can be used). > > When using --with-wide-int (or when running on Windows 64bits) we have > the full 32 bits, right? No. The 2 bits are reserved by Windows, not by Emacs integer's representation. To see that in action, interrupt a program with Ctrl-C and look at the exit status: you will see 0xC000013A; the 0xC0000000 bits are the reserved ones. (There are more values for other fatal exit reasons, but all of them set those 2 bits.) From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 14:22:35 2016 Received: (at 6430) by debbugs.gnu.org; 15 Jun 2016 18:22:35 +0000 Received: from localhost ([127.0.0.1]:42577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDFSV-00063P-2M for submit@debbugs.gnu.org; Wed, 15 Jun 2016 14:22:35 -0400 Received: from smtp08.acens.net ([86.109.99.132]:32787 helo=smtp.movistar.es) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDFSS-00063B-Gi for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 14:22:33 -0400 X-CTCH-RefID: str=0001.0A0B0202.57619CE2.00AC, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (217.125.182.141) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 5746319D012AE250; Wed, 15 Jun 2016 18:22:26 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: Eli Zaretskii Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> <8337oeebr0.fsf@gnu.org> <87inxajxed.fsf@wanadoo.es> <83y466cvfs.fsf@gnu.org> <87eg7yjrwu.fsf@wanadoo.es> <83shwecq84.fsf@gnu.org> <87a8imjqwh.fsf@wanadoo.es> <83r3bycor8.fsf@gnu.org> Date: Wed, 15 Jun 2016 20:22:25 +0200 In-Reply-To: <83r3bycor8.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 15 Jun 2016 21:04:27 +0300") Message-ID: <8760tajori.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 6430 Cc: macross84@ozu.es, 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Eli Zaretskii writes: >> When using --with-wide-int (or when running on Windows 64bits) we have >> the full 32 bits, right? > > No. The 2 bits are reserved by Windows, not by Emacs integer's > representation. To see that in action, interrupt a program with > Ctrl-C and look at the exit status: you will see 0xC000013A; the > 0xC0000000 bits are the reserved ones. (There are more values for > other fatal exit reasons, but all of them set those 2 bits.) I thought that the limitation you referred to was about how many bits Emacs has for representing integers on 32 bit platforms. The upper 2 bits reserved by Windows is an integral part of the exit code. A process can return any value on the 32 bit range. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 14:49:52 2016 Received: (at 6430) by debbugs.gnu.org; 15 Jun 2016 18:49:52 +0000 Received: from localhost ([127.0.0.1]:42593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDFst-0006gv-TN for submit@debbugs.gnu.org; Wed, 15 Jun 2016 14:49:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35021) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDFsr-0006gi-LW for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 14:49:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDFsi-0004zr-Fz for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 14:49:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDFsi-0004zn-Cb; Wed, 15 Jun 2016 14:49:40 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2157 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bDFsf-0007yi-N2; Wed, 15 Jun 2016 14:49:38 -0400 Date: Wed, 15 Jun 2016 21:50:28 +0300 Message-Id: <83oa72cmmj.fsf@gnu.org> From: Eli Zaretskii To: =?iso-8859-1?Q?=D3scar?= Fuentes In-reply-to: <8760tajori.fsf@wanadoo.es> (message from =?iso-8859-1?Q?=D3s?= =?iso-8859-1?Q?car?= Fuentes on Wed, 15 Jun 2016 20:22:25 +0200) Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> <8337oeebr0.fsf@gnu.org> <87inxajxed.fsf@wanadoo.es> <83y466cvfs.fsf@gnu.org> <87eg7yjrwu.fsf@wanadoo.es> <83shwecq84.fsf@gnu.org> <87a8imjqwh.fsf@wanadoo.es> <83r3bycor8.fsf@gnu.org> <8760tajori.fsf@wanadoo.es> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 6430 Cc: macross84@ozu.es, 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Óscar Fuentes > Cc: npostavs@users.sourceforge.net, macross84@ozu.es, 6430@debbugs.gnu.org > Date: Wed, 15 Jun 2016 20:22:25 +0200 > > A process can return any value on the 32 bit range. It can, but using those 2 bits for that would be silly, because doing so will cause the exit code be interpreted as exit due to a fatal error. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 15:32:15 2016 Received: (at 6430) by debbugs.gnu.org; 15 Jun 2016 19:32:15 +0000 Received: from localhost ([127.0.0.1]:42603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDGXu-0007gf-Qb for submit@debbugs.gnu.org; Wed, 15 Jun 2016 15:32:15 -0400 Received: from smtp09.acens.net ([86.109.99.133]:39420 helo=smtp.movistar.es) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDGXs-0007gR-GQ for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 15:32:13 -0400 X-CTCH-RefID: str=0001.0A0B0203.5761AD35.011D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (217.125.182.141) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 571A57FE02F6B6D9; Wed, 15 Jun 2016 19:32:05 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: Eli Zaretskii Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> <8337oeebr0.fsf@gnu.org> <87inxajxed.fsf@wanadoo.es> <83y466cvfs.fsf@gnu.org> <87eg7yjrwu.fsf@wanadoo.es> <83shwecq84.fsf@gnu.org> <87a8imjqwh.fsf@wanadoo.es> <83r3bycor8.fsf@gnu.org> <8760tajori.fsf@wanadoo.es> <83oa72cmmj.fsf@gnu.org> Date: Wed, 15 Jun 2016 21:32:04 +0200 In-Reply-To: <83oa72cmmj.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 15 Jun 2016 21:50:28 +0300") Message-ID: <871t3yjljf.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 6430 Cc: 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Eli Zaretskii writes: >> A process can return any value on the 32 bit range. > > It can, but using those 2 bits for that would be silly, because doing > so will cause the exit code be interpreted as exit due to a fatal > error. AFAIU Emacs currently picks apart the higher bits that (by convention) signals the fatal/special condition, keeps the lower 8 bits as the reported exit code and throws away the rest. The point is that the Elisp code that invoked the external program is not receiving the exit code of the program, but some part of it. If the external program uses exit codes above 255 (apart from the "fatal" ones that Emacs detects), the exit code reported to Elisp is useless, at best. Personally I don't care, because I live on a world of cross-platform software, but it was surprising to learn about this limitation of process handling on Windows, considering how much work was invested on making Emacs a true Windows citizen. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 22:34:55 2016 Received: (at 6430) by debbugs.gnu.org; 16 Jun 2016 02:34:55 +0000 Received: from localhost ([127.0.0.1]:42749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDN8w-0000zp-Uz for submit@debbugs.gnu.org; Wed, 15 Jun 2016 22:34:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDN8u-0000zb-30 for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 22:34:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDN8k-0005p2-9A for 6430@debbugs.gnu.org; Wed, 15 Jun 2016 22:34:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDN8k-0005nP-5y; Wed, 15 Jun 2016 22:34:42 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2492 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bDN8i-0000hu-7G; Wed, 15 Jun 2016 22:34:40 -0400 Date: Thu, 16 Jun 2016 05:35:38 +0300 Message-Id: <83mvmldfnp.fsf@gnu.org> From: Eli Zaretskii To: =?iso-8859-1?Q?=D3scar?= Fuentes In-reply-to: <871t3yjljf.fsf@wanadoo.es> (message from =?iso-8859-1?Q?=D3s?= =?iso-8859-1?Q?car?= Fuentes on Wed, 15 Jun 2016 21:32:04 +0200) Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> <8337oeebr0.fsf@gnu.org> <87inxajxed.fsf@wanadoo.es> <83y466cvfs.fsf@gnu.org> <87eg7yjrwu.fsf@wanadoo.es> <83shwecq84.fsf@gnu.org> <87a8imjqwh.fsf@wanadoo.es> <83r3bycor8.fsf@gnu.org> <8760tajori.fsf@wanadoo.es> <83oa72cmmj.fsf@gnu.org> <871t3yjljf.fsf@wanadoo.es> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 6430 Cc: 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Óscar Fuentes > Cc: npostavs@users.sourceforge.net, 6430@debbugs.gnu.org > Date: Wed, 15 Jun 2016 21:32:04 +0200 > > Personally I don't care, because I live on a world of cross-platform > software, but it was surprising to learn about this limitation of > process handling on Windows, considering how much work was invested on > making Emacs a true Windows citizen. We only solve real-life problems in Emacs, not academical ones. Life is too hard for anything else. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 16 00:13:55 2016 Received: (at 6430) by debbugs.gnu.org; 16 Jun 2016 04:13:55 +0000 Received: from localhost ([127.0.0.1]:42797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDOgl-0003NN-HY for submit@debbugs.gnu.org; Thu, 16 Jun 2016 00:13:55 -0400 Received: from smtp08.acens.net ([86.109.99.132]:38772 helo=smtp.movistar.es) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDOgj-0003N7-IV for 6430@debbugs.gnu.org; Thu, 16 Jun 2016 00:13:54 -0400 X-CTCH-RefID: str=0001.0A0B0205.5762277B.0060, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (217.125.182.141) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 5746319D012F879F; Thu, 16 Jun 2016 04:13:47 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: Eli Zaretskii Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> <8337oeebr0.fsf@gnu.org> <87inxajxed.fsf@wanadoo.es> <83y466cvfs.fsf@gnu.org> <87eg7yjrwu.fsf@wanadoo.es> <83shwecq84.fsf@gnu.org> <87a8imjqwh.fsf@wanadoo.es> <83r3bycor8.fsf@gnu.org> <8760tajori.fsf@wanadoo.es> <83oa72cmmj.fsf@gnu.org> <871t3yjljf.fsf@wanadoo.es> <83mvmldfnp.fsf@gnu.org> Date: Thu, 16 Jun 2016 06:13:46 +0200 In-Reply-To: <83mvmldfnp.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 16 Jun 2016 05:35:38 +0300") Message-ID: <87wplpixdx.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 6430 Cc: 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Eli Zaretskii writes: > We only solve real-life problems in Emacs, not academical ones. Life > is too hard for anything else. The MS toolchain (to name just a case that we could expect to be used from Emacs) outputs quite a few exit codes larger than 255. If the user is interested on detecting one of those codes, he will be out of luck. The fact that there is just one bug report about this limitation of Emacs possibly shows that users are only interested on differentiating success from failure, zero from non-zero exit codes. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 16 11:06:50 2016 Received: (at 6430) by debbugs.gnu.org; 16 Jun 2016 15:06:50 +0000 Received: from localhost ([127.0.0.1]:43440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDYsc-0005ir-3h for submit@debbugs.gnu.org; Thu, 16 Jun 2016 11:06:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDYsZ-0005ib-5g for 6430@debbugs.gnu.org; Thu, 16 Jun 2016 11:06:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDYsP-0006nv-V8 for 6430@debbugs.gnu.org; Thu, 16 Jun 2016 11:06:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDYsP-0006nk-S7; Thu, 16 Jun 2016 11:06:37 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3117 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bDYsO-0006T7-0U; Thu, 16 Jun 2016 11:06:36 -0400 Date: Thu, 16 Jun 2016 18:07:35 +0300 Message-Id: <83k2hpcgug.fsf@gnu.org> From: Eli Zaretskii To: =?iso-8859-1?Q?=D3scar?= Fuentes In-reply-to: <87wplpixdx.fsf@wanadoo.es> (message from =?iso-8859-1?Q?=D3s?= =?iso-8859-1?Q?car?= Fuentes on Thu, 16 Jun 2016 06:13:46 +0200) Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> <8337oeebr0.fsf@gnu.org> <87inxajxed.fsf@wanadoo.es> <83y466cvfs.fsf@gnu.org> <87eg7yjrwu.fsf@wanadoo.es> <83shwecq84.fsf@gnu.org> <87a8imjqwh.fsf@wanadoo.es> <83r3bycor8.fsf@gnu.org> <8760tajori.fsf@wanadoo.es> <83oa72cmmj.fsf@gnu.org> <871t3yjljf.fsf@wanadoo.es> <83mvmldfnp.fsf@gnu.org> <87wplpixdx.fsf@wanadoo.es> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 6430 Cc: 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Óscar Fuentes > Cc: npostavs@users.sourceforge.net, 6430@debbugs.gnu.org > Date: Thu, 16 Jun 2016 06:13:46 +0200 > > Eli Zaretskii writes: > > > We only solve real-life problems in Emacs, not academical ones. Life > > is too hard for anything else. > > The MS toolchain (to name just a case that we could expect to be used > from Emacs) outputs quite a few exit codes larger than 255. Any pointers to where these values are documented? From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 16 13:56:58 2016 Received: (at 6430) by debbugs.gnu.org; 16 Jun 2016 17:56:58 +0000 Received: from localhost ([127.0.0.1]:43521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDbXG-0002wL-ES for submit@debbugs.gnu.org; Thu, 16 Jun 2016 13:56:58 -0400 Received: from smtp22.acens.net ([86.109.99.146]:33768 helo=smtp.movistar.es) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDbXE-0002w7-BY for 6430@debbugs.gnu.org; Thu, 16 Jun 2016 13:56:57 -0400 X-CTCH-RefID: str=0001.0A0B0205.5762E861.02E1, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (217.125.182.141) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 57462DC9013C0135; Thu, 16 Jun 2016 17:56:49 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: Eli Zaretskii Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> <8337oeebr0.fsf@gnu.org> <87inxajxed.fsf@wanadoo.es> <83y466cvfs.fsf@gnu.org> <87eg7yjrwu.fsf@wanadoo.es> <83shwecq84.fsf@gnu.org> <87a8imjqwh.fsf@wanadoo.es> <83r3bycor8.fsf@gnu.org> <8760tajori.fsf@wanadoo.es> <83oa72cmmj.fsf@gnu.org> <871t3yjljf.fsf@wanadoo.es> <83mvmldfnp.fsf@gnu.org> <87wplpixdx.fsf@wanadoo.es> <83k2hpcgug.fsf@gnu.org> Date: Thu, 16 Jun 2016 19:56:48 +0200 In-Reply-To: <83k2hpcgug.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 16 Jun 2016 18:07:35 +0300") Message-ID: <87shwdhva7.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 6430 Cc: 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) Eli Zaretskii writes: >> The MS toolchain (to name just a case that we could expect to be used >> from Emacs) outputs quite a few exit codes larger than 255. > > Any pointers to where these values are documented? cl.exe, for instance, uses the codes in winerror.h for reporting failures: https://msdn.microsoft.com/en-us/library/ebh0y918.aspx AFAIR it is a common practice among MS applications, and widely used by Windows-only software vendors. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 16 15:04:37 2016 Received: (at 6430) by debbugs.gnu.org; 16 Jun 2016 19:04:37 +0000 Received: from localhost ([127.0.0.1]:43531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDcaj-0004Wd-MG for submit@debbugs.gnu.org; Thu, 16 Jun 2016 15:04:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDcag-0004WL-Tz for 6430@debbugs.gnu.org; Thu, 16 Jun 2016 15:04:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDcaY-0007Wb-LQ for 6430@debbugs.gnu.org; Thu, 16 Jun 2016 15:04:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDcaY-0007WW-Ib; Thu, 16 Jun 2016 15:04:26 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3335 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bDcaU-0004M2-M3; Thu, 16 Jun 2016 15:04:25 -0400 Date: Thu, 16 Jun 2016 22:05:08 +0300 Message-Id: <83fusdc5uj.fsf@gnu.org> From: Eli Zaretskii To: =?iso-8859-1?Q?=D3scar?= Fuentes In-reply-to: <87shwdhva7.fsf@wanadoo.es> (message from =?iso-8859-1?Q?=D3s?= =?iso-8859-1?Q?car?= Fuentes on Thu, 16 Jun 2016 19:56:48 +0200) Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> <8337oeebr0.fsf@gnu.org> <87inxajxed.fsf@wanadoo.es> <83y466cvfs.fsf@gnu.org> <87eg7yjrwu.fsf@wanadoo.es> <83shwecq84.fsf@gnu.org> <87a8imjqwh.fsf@wanadoo.es> <83r3bycor8.fsf@gnu.org> <8760tajori.fsf@wanadoo.es> <83oa72cmmj.fsf@gnu.org> <871t3yjljf.fsf@wanadoo.es> <83mvmldfnp.fsf@gnu.org> <87wplpixdx.fsf@wanadoo.es> <83k2hpcgug.fsf@gnu.org> <87shwdhva7.fsf@wanadoo.es> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 6430 Cc: 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Óscar Fuentes > Cc: npostavs@users.sourceforge.net, 6430@debbugs.gnu.org > Date: Thu, 16 Jun 2016 19:56:48 +0200 > > cl.exe, for instance, uses the codes in winerror.h for reporting > failures: > > https://msdn.microsoft.com/en-us/library/ebh0y918.aspx Those are just the normal error codes in disguise, and the ones relevant to cl.exe are all below 255 (when the top 2 bits are stripped). So I see no problem here with the 8-bit limitation of the status we report. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 18 23:05:29 2020 Received: (at 6430) by debbugs.gnu.org; 19 Nov 2020 04:05:29 +0000 Received: from localhost ([127.0.0.1]:37461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfbCK-00019E-Jh for submit@debbugs.gnu.org; Wed, 18 Nov 2020 23:05:28 -0500 Received: from mail-ed1-f49.google.com ([209.85.208.49]:43461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfbCG-00018h-0Y for 6430@debbugs.gnu.org; Wed, 18 Nov 2020 23:05:26 -0500 Received: by mail-ed1-f49.google.com with SMTP id q16so4340895edv.10 for <6430@debbugs.gnu.org>; Wed, 18 Nov 2020 20:05:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc :content-transfer-encoding; bh=JkPBZBkwuVZAHC6fSoNtzyuKQ6EF0J6zhiV0+gXOepM=; b=N+flffpjwkJgN5GRMfoVRiVBdvmT6u7HTPyX5PfsnW2auzO/ezKzkajvrMrlQT1lD2 8xdMoSQ8kiltwHOP9J3XfLsJyvDtlcIfUF06kfm+C9HP6ncLV6dSv9fkYUJ9KzUpelAj OjCQueyjct/tLcuFZ7jfQiOq86C8V8ZZMqHOlcGFPNuuO6fQqBXRd9KQoAWTzsZFKmp6 LBhffqtKAQAsZ44rjs1vShElY4F3mp8mPnQVcQOj/JY9ULm85euy373dz+3LR22TRoRW FY6+mESLuFAx227iAAu5JNgxDnTh+K8pbjp33g70KNqvEd9QXWtDsr0DXTcGfQIErJVq hQew== X-Gm-Message-State: AOAM532cHRZh4FwbqVGINNOzmGo3UPRW7RwIu3rPww8JIN0vW/OrcgDX +hWo5T0po+E9Gr4Y9FThKGfOK8MnqhkyTrFniX3kfKsQMWU= X-Google-Smtp-Source: ABdhPJwjk/GsjDDkkKhxHHRLuvNNt8n0wa3iV+iSyOJmL8+OpzZLb52VCsVc50N+Q/XUYsFBuwdn3xiBqz9TaDpy/t0= X-Received: by 2002:a05:6402:1114:: with SMTP id u20mr27536848edv.377.1605758718535; Wed, 18 Nov 2020 20:05:18 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 18 Nov 2020 20:05:18 -0800 From: Stefan Kangas In-Reply-To: <83fusdc5uj.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 16 Jun 2016 22:05:08 +0300") References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> <831t3zg7or.fsf@gnu.org> <83d1njdvk9.fsf@gnu.org> <87mvmmk52b.fsf@wanadoo.es> <8337oeebr0.fsf@gnu.org> <87inxajxed.fsf@wanadoo.es> <83y466cvfs.fsf@gnu.org> <87eg7yjrwu.fsf@wanadoo.es> <83shwecq84.fsf@gnu.org> <87a8imjqwh.fsf@wanadoo.es> <83r3bycor8.fsf@gnu.org> <8760tajori.fsf@wanadoo.es> <83oa72cmmj.fsf@gnu.org> <871t3yjljf.fsf@wanadoo.es> <83mvmldfnp.fsf@gnu.org> <87wplpixdx.fsf@wanadoo.es> <83k2hpcgug.fsf@gnu.org> <87shwdhva7.fsf@wanadoo.es> <83fusdc5uj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Wed, 18 Nov 2020 20:05:18 -0800 Message-ID: Subject: Re: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 6430 Cc: =?UTF-8?Q?=C3=93scar_Fuentes?= , 6430@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) tags 6430 + wontfix close 6430 thanks Eli Zaretskii writes: >> From: =C3=93scar Fuentes >> Cc: npostavs@users.sourceforge.net, 6430@debbugs.gnu.org >> Date: Thu, 16 Jun 2016 19:56:48 +0200 >> >> cl.exe, for instance, uses the codes in winerror.h for reporting >> failures: >> >> https://msdn.microsoft.com/en-us/library/ebh0y918.aspx > > Those are just the normal error codes in disguise, and the ones > relevant to cl.exe are all below 255 (when the top 2 bits are > stripped). So I see no problem here with the 8-bit limitation of the > status we report. There was a discussion here where both Noam and Eli seemed to think there is no bug. And I only see one differing opinion from that; in any case, it seems unlikely we will do anything about this. I'm therefore closing this bug report. If anyone really feels strongly about this, I suppose they should reopen the bug or propose a patch for discussion. From unknown Thu Aug 14 21:46:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 17 Dec 2020 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator