diff options
| author | Philipp Stephani | 2018-01-08 21:51:44 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2018-01-10 15:43:52 +0100 |
| commit | 9c2b11484f8a5a07c748a18a872947c5c062883b (patch) | |
| tree | 273a81d28a47997c0076babf9a403a249f9095fd /src/process.c | |
| parent | 3efb1e7defc6bc4eeebbf05d9d4bf2d0deb5a4c1 (diff) | |
| download | emacs-9c2b11484f8a5a07c748a18a872947c5c062883b.tar.gz emacs-9c2b11484f8a5a07c748a18a872947c5c062883b.zip | |
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.c | 8 |
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) */) | |||
| 1686 | if (!NILP (program)) | 1686 | if (!NILP (program)) |
| 1687 | CHECK_STRING (program); | 1687 | CHECK_STRING (program); |
| 1688 | 1688 | ||
| 1689 | bool query_on_exit = NILP (Fplist_get (contact, QCnoquery)); | ||
| 1690 | |||
| 1689 | stderrproc = Qnil; | 1691 | stderrproc = Qnil; |
| 1690 | xstderr = Fplist_get (contact, QCstderr); | 1692 | xstderr = Fplist_get (contact, QCstderr); |
| 1691 | if (PROCESSP (xstderr)) | 1693 | if (PROCESSP (xstderr)) |
| @@ -1701,7 +1703,9 @@ usage: (make-process &rest ARGS) */) | |||
| 1701 | QCname, | 1703 | QCname, |
| 1702 | concat2 (name, build_string (" stderr")), | 1704 | concat2 (name, build_string (" stderr")), |
| 1703 | QCbuffer, | 1705 | QCbuffer, |
| 1704 | Fget_buffer_create (xstderr)); | 1706 | Fget_buffer_create (xstderr), |
| 1707 | QCnoquery, | ||
| 1708 | query_on_exit ? Qnil : Qt); | ||
| 1705 | } | 1709 | } |
| 1706 | 1710 | ||
| 1707 | proc = make_process (name); | 1711 | proc = make_process (name); |
| @@ -1715,7 +1719,7 @@ usage: (make-process &rest ARGS) */) | |||
| 1715 | pset_filter (XPROCESS (proc), Fplist_get (contact, QCfilter)); | 1719 | pset_filter (XPROCESS (proc), Fplist_get (contact, QCfilter)); |
| 1716 | pset_command (XPROCESS (proc), Fcopy_sequence (command)); | 1720 | pset_command (XPROCESS (proc), Fcopy_sequence (command)); |
| 1717 | 1721 | ||
| 1718 | if (tem = Fplist_get (contact, QCnoquery), !NILP (tem)) | 1722 | if (!query_on_exit) |
| 1719 | XPROCESS (proc)->kill_without_query = 1; | 1723 | XPROCESS (proc)->kill_without_query = 1; |
| 1720 | if (tem = Fplist_get (contact, QCstop), !NILP (tem)) | 1724 | if (tem = Fplist_get (contact, QCstop), !NILP (tem)) |
| 1721 | pset_command (XPROCESS (proc), Qt); | 1725 | pset_command (XPROCESS (proc), Qt); |