[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Query about call-process
From: |
Philipp Stephani |
Subject: |
Re: Query about call-process |
Date: |
Fri, 30 Mar 2018 19:44:25 +0000 |
Narendra Joshi <narendraj9@gmail.com> schrieb am Fr., 30. März 2018 um
20:49 Uhr:
> Hi,
>
> The document string for `call-process' says that
> > You can’t directly specify a buffer to put the error output
> > in; that is too difficult to implement. But you can achieve
> > this result by sending the error output to a temporary file
> > and then inserting the file into a buffer when the subprocess
> > finishes.
>
> I would like to understand what makes doing this difficult?
>
It requires a select loop because you'd have to read from the stdout and
stderr pipe simultaneously. For the same reason, standard input also has to
come from a file.
Though the argument is a bit weird because `make-process' can do exactly
that. It would just require changing `call-process' to use a select loop to
achieve the same effect.