From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=C3=93scar?= Fuentes Newsgroups: gmane.emacs.bugs Subject: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits Date: Wed, 15 Jun 2016 21:32:04 +0200 Message-ID: <871t3yjljf.fsf@wanadoo.es> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466019309 16281 80.91.229.3 (15 Jun 2016 19:35:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jun 2016 19:35:09 +0000 (UTC) Cc: 6430@debbugs.gnu.org, npostavs@users.sourceforge.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 15 21:34:57 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 1bDGaW-0007PA-KW for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Jun 2016 21:34:56 +0200 Original-Received: from localhost ([::1]:44645 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDGaR-0002vp-VI for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Jun 2016 15:34:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDGYl-0001pu-9h for bug-gnu-emacs@gnu.org; Wed, 15 Jun 2016 15:33:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDGYh-0006Ge-1m for bug-gnu-emacs@gnu.org; Wed, 15 Jun 2016 15:33:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDGYg-0006GS-VZ for bug-gnu-emacs@gnu.org; Wed, 15 Jun 2016 15:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bDGYg-0007hm-FJ for bug-gnu-emacs@gnu.org; Wed, 15 Jun 2016 15:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=C3=93scar?= Fuentes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Jun 2016 19:33: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: Original-Received: via spool by 6430-submit@debbugs.gnu.org id=B6430.146601913529557 (code B ref 6430); Wed, 15 Jun 2016 19:33:02 +0000 Original-Received: (at 6430) by debbugs.gnu.org; 15 Jun 2016 19:32:15 +0000 Original-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 Original-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 Original-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 In-Reply-To: <83oa72cmmj.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 15 Jun 2016 21:50:28 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) 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:119597 Archived-At: 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.