We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9694cc8 + 6e4580a commit 07bb353Copy full SHA for 07bb353
lib/AST/PluginRegistry.cpp
@@ -214,7 +214,13 @@ LoadedExecutablePlugin::PluginProcess::~PluginProcess() {
214
close(input);
215
close(output);
216
#endif
217
- llvm::sys::Wait(process, /*SecondsToWait=*/0);
+
218
+ // Set `SecondsToWait` non-zero so it waits for the timeout and kill it after
219
+ // that. Usually when the pipe is closed above, the plugin detects the EOF in
220
+ // the stdin and exits immediately, so this usually doesn't wait for the
221
+ // timeout. Note that we can't use '0' because it performs a non-blocking
222
+ // wait, which make the plugin a zombie if it hasn't exited.
223
+ llvm::sys::Wait(process, /*SecondsToWait=*/1);
224
}
225
226
ssize_t LoadedExecutablePlugin::PluginProcess::read(void *buf,
0 commit comments