Skip to content

Commit 9d2c513

Browse files
authored
Add error handling in case of AutocompleteStub Failure for DLIS-5819 (#356)
* DLIS-5819 * Guard WaitForStubProcess in case of failed auto-complete-config
1 parent b7a0690 commit 9d2c513

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/stub_launcher.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,11 @@ StubLauncher::WaitForStubProcess()
787787
CloseHandle(stub_pid_.hThread);
788788
#else
789789
int status;
790-
waitpid(stub_pid_, &status, 0);
790+
if (stub_pid_ != 0) {
791+
// Added this check to ensure server doesn't hang waiting after stub
792+
// process has already be killed and cannot be waited on
793+
waitpid(stub_pid_, &status, 0);
794+
}
791795
#endif
792796
}
793797

0 commit comments

Comments
 (0)