emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lispref/processes.texi


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lispref/processes.texi
Date: Fri, 12 Jul 2002 19:32:14 -0400

Index: emacs/lispref/processes.texi
diff -c emacs/lispref/processes.texi:1.26 emacs/lispref/processes.texi:1.27
*** emacs/lispref/processes.texi:1.26   Sun Apr  7 14:58:06 2002
--- emacs/lispref/processes.texi        Fri Jul 12 19:32:14 2002
***************
*** 43,51 ****
  * 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.
  * Transaction Queues::             Transaction-based communication with 
subprocesses.
  * Network::                  Opening network connections.
  @end menu
--- 43,51 ----
  * Input to Processes::       Sending input to an asynchronous subprocess.
  * Signals to Processes::     Stopping, continuing or interrupting
                                 an asynchronous subprocess.
  * 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,466 ****
  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
  @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}.
--- 460,466 ----
  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} 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,493 ****
  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.
  
    @code{get-buffer-process} and @code{process-list} do not remember a
  deleted process, but the process object itself continues to exist as
--- 486,493 ----
  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 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,910 ****
  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
- address@hidden, 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
--- 855,860 ----
***************
*** 917,922 ****
--- 867,877 ----
  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
***************
*** 1343,1348 ****
--- 1298,1353 ----
  address@hidden if Emacs was waiting for keyboard input from the user at
  the time the sentinel or filter function was called, @code{nil} if it
  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
+ address@hidden, 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]