aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-07-07 20:43:33 +0000
committerRichard M. Stallman2003-07-07 20:43:33 +0000
commit43b4d3c02b08591be308e0f969d0eb6835d0eee2 (patch)
treee7ccc009859ac0b404b60e44ae100d28169911fe
parenta70a412f7d7247e3824bba3b96db3fa87337fbe5 (diff)
downloademacs-43b4d3c02b08591be308e0f969d0eb6835d0eee2.tar.gz
emacs-43b4d3c02b08591be308e0f969d0eb6835d0eee2.zip
(Compilation): Document what happens with asynch children of compiler process.
-rw-r--r--man/building.texi27
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
102follow output as it comes in. 102follow 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
106the compiler process terminates, the mode line of the 106line of the @samp{*compilation*} buffer changes to say @samp{signal}
107@samp{*compilation*} buffer changes to say @samp{signal} instead of 107instead of @samp{run}. Starting a new compilation also kills any
108@samp{run}. Starting a new compilation also kills any running 108running compilation, as only one can exist at any time. However,
109compilation, as only one can exist at any time. However, @kbd{M-x 109@kbd{M-x compile} asks for confirmation before actually killing a
110compile} asks for confirmation before actually killing a compilation 110compilation that is running. You can also kill the compilation
111that is running. 111process 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
115recompile}. This automatically reuses the compilation command from the 115recompile}. This automatically reuses the compilation command from the
116last invocation of @kbd{M-x compile}. 116last 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
119subprocesses; if it does, and they keep running after the main 119subprocesses; if it does, and they keep running after the main
120compiler process has terminated, their output may not arrive in Emacs. 120compiler process has terminated, Emacs may kill them or their output
121may not arrive in Emacs. To avoid this problem, make the main process
122wait for its subprocesses to finish. In a shell script, you can do this
123using @samp{$!} and @samp{wait}, like this:
124
125@example
126(sleep 10; echo 2nd)& pid=$! # @r{Record pid of subprocess}
127echo first message
128wait $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