summaryrefslogtreecommitdiff
path: root/src/process.c
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2018-01-08 21:51:44 +0100
committerPhilipp Stephani <phst@google.com>2018-01-10 15:43:52 +0100
commit9c2b11484f8a5a07c748a18a872947c5c062883b (patch)
tree273a81d28a47997c0076babf9a403a249f9095fd /src/process.c
parent3efb1e7defc6bc4eeebbf05d9d4bf2d0deb5a4c1 (diff)
downloademacs-9c2b11484f8a5a07c748a18a872947c5c062883b.tar.gz
Inherit query-on-exit flag to stderr process (Bug#30031)
* src/process.c (Fmake_process): Have the pipe process honor the parent's query-on-exit flag. * test/src/process-tests.el (make-process/noquery-stderr): New test.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c
index 94d9f8c6a5c..36fb8a70cf1 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1686,6 +1686,8 @@ usage: (make-process &rest ARGS) */)
if (!NILP (program))
CHECK_STRING (program);
+ bool query_on_exit = NILP (Fplist_get (contact, QCnoquery));
+
stderrproc = Qnil;
xstderr = Fplist_get (contact, QCstderr);
if (PROCESSP (xstderr))
@@ -1701,7 +1703,9 @@ usage: (make-process &rest ARGS) */)
QCname,
concat2 (name, build_string (" stderr")),
QCbuffer,
- Fget_buffer_create (xstderr));
+ Fget_buffer_create (xstderr),
+ QCnoquery,
+ query_on_exit ? Qnil : Qt);
}
proc = make_process (name);
@@ -1715,7 +1719,7 @@ usage: (make-process &rest ARGS) */)
pset_filter (XPROCESS (proc), Fplist_get (contact, QCfilter));
pset_command (XPROCESS (proc), Fcopy_sequence (command));
- if (tem = Fplist_get (contact, QCnoquery), !NILP (tem))
+ if (!query_on_exit)
XPROCESS (proc)->kill_without_query = 1;
if (tem = Fplist_get (contact, QCstop), !NILP (tem))
pset_command (XPROCESS (proc), Qt);