diff options
| -rw-r--r-- | man/building.texi | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/man/building.texi b/man/building.texi index e9dd079ccd9..5cadfbcc553 100644 --- a/man/building.texi +++ b/man/building.texi | |||
| @@ -102,22 +102,31 @@ non-@code{nil} value, then the compilation buffer always scrolls to | |||
| 102 | follow output as it comes in. | 102 | follow output as it comes in. |
| 103 | 103 | ||
| 104 | @findex kill-compilation | 104 | @findex kill-compilation |
| 105 | To kill the compilation process, do @kbd{M-x kill-compilation}. When | 105 | When the compiler process terminates, for whatever reason, the mode |
| 106 | the compiler process terminates, the mode line of the | 106 | line of the @samp{*compilation*} buffer changes to say @samp{signal} |
| 107 | @samp{*compilation*} buffer changes to say @samp{signal} instead of | 107 | instead of @samp{run}. Starting a new compilation also kills any |
| 108 | @samp{run}. Starting a new compilation also kills any running | 108 | running compilation, as only one can exist at any time. However, |
| 109 | compilation, as only one can exist at any time. However, @kbd{M-x | 109 | @kbd{M-x compile} asks for confirmation before actually killing a |
| 110 | compile} asks for confirmation before actually killing a compilation | 110 | compilation that is running. You can also kill the compilation |
| 111 | that is running. | 111 | process with @kbd{M-x kill-compilation}. |
| 112 | 112 | ||
| 113 | @findex recompile | 113 | @findex recompile |
| 114 | To rerun the last compilation with the same command, type @kbd{M-x | 114 | To rerun the last compilation with the same command, type @kbd{M-x |
| 115 | recompile}. This automatically reuses the compilation command from the | 115 | recompile}. This automatically reuses the compilation command from the |
| 116 | last invocation of @kbd{M-x compile}. | 116 | last invocation of @kbd{M-x compile}. |
| 117 | 117 | ||
| 118 | Emacs does not expect a compiler to launch asynchronous | 118 | Emacs does not expect a compiler process to launch asynchronous |
| 119 | subprocesses; if it does, and they keep running after the main | 119 | subprocesses; if it does, and they keep running after the main |
| 120 | compiler process has terminated, their output may not arrive in Emacs. | 120 | compiler process has terminated, Emacs may kill them or their output |
| 121 | may not arrive in Emacs. To avoid this problem, make the main process | ||
| 122 | wait for its subprocesses to finish. In a shell script, you can do this | ||
| 123 | using @samp{$!} and @samp{wait}, like this: | ||
| 124 | |||
| 125 | @example | ||
| 126 | (sleep 10; echo 2nd)& pid=$! # @r{Record pid of subprocess} | ||
| 127 | echo first message | ||
| 128 | wait $pid # @r{Wait for subprocess} | ||
| 129 | @end example | ||
| 121 | 130 | ||
| 122 | @node Grep Searching | 131 | @node Grep Searching |
| 123 | @section Searching with Grep under Emacs | 132 | @section Searching with Grep under Emacs |