From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: macross84@ozu.es, 6430@debbugs.gnu.org
Subject: bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits
Date: Tue, 14 Jun 2016 17:48:22 -0400 [thread overview]
Message-ID: <CAM-tV-82XV=tKDnrnurYn2PsNYxZz6T9iDTTQ2HhevhNyKcthg@mail.gmail.com> (raw)
In-Reply-To: <831t3zg7or.fsf@gnu.org>
On Tue, Jun 14, 2016 at 10:35 AM, Eli Zaretskii <eliz@gnu.org> 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 <stdlib.h>
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.
next prev parent reply other threads:[~2016-06-14 21:48 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-15 17:20 bug#6430: Emacs WINDOWS truncates exit status of processes to 8 bits macross84
2016-06-14 2:48 ` Noam Postavsky
2016-06-14 13:07 ` Óscar Fuentes
2016-06-14 14:35 ` Eli Zaretskii
2016-06-14 21:48 ` Noam Postavsky [this message]
2016-06-15 2:39 ` Eli Zaretskii
2016-06-15 12:30 ` Óscar Fuentes
2016-06-15 15:02 ` Eli Zaretskii
2016-06-15 15:15 ` Óscar Fuentes
2016-06-15 15:40 ` Eli Zaretskii
2016-06-15 17:14 ` Óscar Fuentes
2016-06-15 17:32 ` Eli Zaretskii
2016-06-15 17:36 ` Óscar Fuentes
2016-06-15 18:04 ` Eli Zaretskii
2016-06-15 18:22 ` Óscar Fuentes
2016-06-15 18:50 ` Eli Zaretskii
2016-06-15 19:32 ` Óscar Fuentes
2016-06-16 2:35 ` Eli Zaretskii
2016-06-16 4:13 ` Óscar Fuentes
2016-06-16 15:07 ` Eli Zaretskii
2016-06-16 17:56 ` Óscar Fuentes
2016-06-16 19:05 ` Eli Zaretskii
2020-11-19 4:05 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAM-tV-82XV=tKDnrnurYn2PsNYxZz6T9iDTTQ2HhevhNyKcthg@mail.gmail.com' \
--to=npostavs@users.sourceforge.net \
--cc=6430@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=macross84@ozu.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.