From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits Date: Tue, 14 Jun 2016 17:35:00 +0300 Message-ID: <831t3zg7or.fsf@gnu.org> References: <1310.80.58.205.52.1276622459.squirrel@correo.ozu.es> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1465916463 29302 80.91.229.3 (14 Jun 2016 15:01:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jun 2016 15:01:03 +0000 (UTC) Cc: macross84@ozu.es, 6430@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 14 17:00:52 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bCppg-0007t5-Q8 for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Jun 2016 17:00:48 +0200 Original-Received: from localhost ([::1]:35895 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCppg-0007Tv-2r for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Jun 2016 11:00:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCpQq-0007OH-N6 for bug-gnu-emacs@gnu.org; Tue, 14 Jun 2016 10:35:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCpQk-0004eD-R7 for bug-gnu-emacs@gnu.org; Tue, 14 Jun 2016 10:35:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCpQk-0004e8-MU for bug-gnu-emacs@gnu.org; Tue, 14 Jun 2016 10:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bCpQk-0000Au-I6 for bug-gnu-emacs@gnu.org; Tue, 14 Jun 2016 10:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Jun 2016 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6430 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 6430-submit@debbugs.gnu.org id=B6430.1465914883644 (code B ref 6430); Tue, 14 Jun 2016 14:35:02 +0000 Original-Received: (at 6430) by debbugs.gnu.org; 14 Jun 2016 14:34:43 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 In-reply-to: (message from Noam Postavsky on Mon, 13 Jun 2016 22:48:25 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:119541 Archived-At: > 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.