GNU bug report logs -
#57854
29.0.50; Different exit code in Emacs and terminal for identical process
Previous Next
Reported by: dalanicolai <dalanicolai <at> gmail.com>
Date: Fri, 16 Sep 2022 09:41:02 UTC
Severity: normal
Tags: moreinfo
Found in version 29.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: dalanicolai <dalanicolai <at> gmail.com>
> Date: Sat, 17 Sep 2022 15:37:08 +0200
> Cc: 57854 <at> debbugs.gnu.org
>
> Indeed, when invoking the command from the shell prompt using /dev/null as input
> (pdftocio ... < /dev/null), then the command does not return an error (i.e. exit code is 0).
>
> So, indeed there is a difference between invoking it from Emacs and invoking it from the
> shell prompt (without the /dev/null input). This might not be considered a bug, but it is not
> trivial to me, that using call-process implies sending the null-device as input.
>
> Is there a way to call a process from elisp, without sending the input?
You could use start-process instead, and then wait for the process to
finish. It would complicate the Lisp program, though.
> Otherwise, I would
> probably change this into a 'documentation bug' report, in the sense that it would be nice
> if this detail was mentioned in the docs (I think it is not currently).
The doc string of call-process already says that:
The program’s input comes from file INFILE (nil means ‘null-device’).
This bug report was last modified 2 years and 244 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.