Subject: Re: bug#57854: 29.0.50; Different exit code in Emacs and terminal for identical process

From: dalanicolai <[email-masked]>
Date: Sat, 17 Sep 2022 16:16:42 +0200

Ah yes, you are totally right (I probably looked over it because I,
previously, did not understand its meaning/consequences).

Using start-process will be fine (setting a sentinel is not too
complicated).

Thanks (again) for your help!

On Sat, 17 Sept 2022 at 15:56, Eli Zaretskii <[email-masked]> wrote:

> > From: dalanicolai <[email-masked]>
> > Date: Sat, 17 Sep 2022 15:37:08 +0200
> > Cc: [email-masked]
> >
> > 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’).
>