GNU bug report logs -
#6430
Emacs WINDOWS truncates exit status of processes to 8 bits
Previous Next
Reported by: macross84 <at> ozu.es
Date: Tue, 15 Jun 2010 17:29:01 UTC
Severity: wishlist
Tags: wontfix
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
Message #59 received at 6430 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> 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.
This bug report was last modified 4 years and 187 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.