Mercurial > emacs
changeset 46340:dd413d2af8ad
Move the node Query Before Exit down.
Say that Emacs stops reading when a process terminates.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 12 Jul 2002 23:32:14 +0000 |
parents | 469cf4d8b62b |
children | ff3a56c0df0f |
files | lispref/processes.texi |
diffstat | 1 files changed, 59 insertions(+), 54 deletions(-) [+] |
line wrap: on
line diff
--- a/lispref/processes.texi Fri Jul 12 23:31:02 2002 +0000 +++ b/lispref/processes.texi Fri Jul 12 23:32:14 2002 +0000 @@ -43,9 +43,9 @@ * Input to Processes:: Sending input to an asynchronous subprocess. * Signals to Processes:: Stopping, continuing or interrupting an asynchronous subprocess. -* Query Before Exit:: Whether to query if exiting will kill a process. * Output from Processes:: Collecting output from an asynchronous subprocess. * Sentinels:: Sentinels run when process run-status changes. +* Query Before Exit:: Whether to query if exiting will kill a process. * Transaction Queues:: Transaction-based communication with subprocesses. * Network:: Opening network connections. @end menu @@ -460,7 +460,7 @@ addition, the total number of @sc{pty}s is limited on many systems and it is good not to waste them. -The value of @code{process-connection-type} is used when +The value of @code{process-connection-type} takes effect when @code{start-process} is called. So you can specify how to communicate with one subprocess by binding the variable around the call to @code{start-process}. @@ -486,8 +486,8 @@ but not necessarily right away. You can delete a process explicitly at any time. If you delete a terminated process explicitly before it is deleted automatically, no harm results. Deletion of a running -process sends a signal to terminate it and calls the process sentinel -if it has one. +process sends a signal to terminate it (and its child processes if +any), and calls the process sentinel if it has one. @code{get-buffer-process} and @code{process-list} do not remember a deleted process, but the process object itself continues to exist as @@ -855,56 +855,6 @@ to send; it should be an integer. @end defun -@node Query Before Exit -@section Querying Before Exit - - When Emacs exits, it terminates all its subprocesses by sending them -the @code{SIGHUP} signal. Because some subprocesses are doing -valuable work, Emacs normally asks the user to confirm that it is ok -to terminate them. Each process has a query flag which, if -non-@code{nil}, says that Emacs should ask for confirmation before -exiting and thus killing that process. The default for the query flag -is @code{t}, meaning @emph{do} query. - -@tindex process-query-on-exit-flag -@defun process-query-on-exit-flag process -This returns the query flag of @var{process}. -@end defun - -@tindex set-process-query-on-exit-flag -@defun set-process-query-on-exit-flag process flag -This function sets the query flag of @var{process} to @var{flag}. It -returns @var{flag}. - -@smallexample -@group -;; @r{Don't query about the shell process} -(set-process-query-on-exit-flag (get-process "shell") nil) - @result{} t -@end group -@end smallexample -@end defun - -@defun process-kill-without-query process &optional do-query -This function clears the query flag of @var{process}, so that -Emacs will not query the user on account of that process. - -Actually, the function does more than that: it returns the old value of -the process's query flag, and sets the query flag to @var{do-query}. -Please don't use this function to do those things any more---please -use the newer, cleaner functions @code{process-query-on-exit-flag} and -@code{set-process-query-on-exit-flag} in all but the simplest cases. -The only way you should use @code{process-kill-without-query} nowadays -is like this: - -@smallexample -@group -;; @r{Don't query about the shell process} -(process-kill-without-query (get-process "shell")) -@end group -@end smallexample -@end defun - @node Output from Processes @section Receiving Output from Processes @cindex process output @@ -917,6 +867,11 @@ the process has no buffer and no filter function, its output is discarded. + When a subprocess terminates, Emacs reads any pending output, +then stops reading output from that subprocess. Therefore, if the +subprocess has children that are still live and still producing +output, Emacs won't receive that output. + Output from a subprocess can arrive only while Emacs is waiting: when reading terminal input, in @code{sit-for} and @code{sleep-for} (@pxref{Waiting}), and in @code{accept-process-output} (@pxref{Accepting @@ -1345,6 +1300,56 @@ was not. @end defun +@node Query Before Exit +@section Querying Before Exit + + When Emacs exits, it terminates all its subprocesses by sending them +the @code{SIGHUP} signal. Because some subprocesses are doing +valuable work, Emacs normally asks the user to confirm that it is ok +to terminate them. Each process has a query flag which, if +non-@code{nil}, says that Emacs should ask for confirmation before +exiting and thus killing that process. The default for the query flag +is @code{t}, meaning @emph{do} query. + +@tindex process-query-on-exit-flag +@defun process-query-on-exit-flag process +This returns the query flag of @var{process}. +@end defun + +@tindex set-process-query-on-exit-flag +@defun set-process-query-on-exit-flag process flag +This function sets the query flag of @var{process} to @var{flag}. It +returns @var{flag}. + +@smallexample +@group +;; @r{Don't query about the shell process} +(set-process-query-on-exit-flag (get-process "shell") nil) + @result{} t +@end group +@end smallexample +@end defun + +@defun process-kill-without-query process &optional do-query +This function clears the query flag of @var{process}, so that +Emacs will not query the user on account of that process. + +Actually, the function does more than that: it returns the old value of +the process's query flag, and sets the query flag to @var{do-query}. +Please don't use this function to do those things any more---please +use the newer, cleaner functions @code{process-query-on-exit-flag} and +@code{set-process-query-on-exit-flag} in all but the simplest cases. +The only way you should use @code{process-kill-without-query} nowadays +is like this: + +@smallexample +@group +;; @r{Don't query about the shell process} +(process-kill-without-query (get-process "shell")) +@end group +@end smallexample +@end defun + @node Transaction Queues @section Transaction Queues @cindex transaction queue