Expose a single process_wait()

There were two versions: process_wait() and process_wait_noclose().

Expose a single version with a flag (it was already implemented that way
internally).
This commit is contained in:
Romain Vimont
2021-01-22 18:48:17 +01:00
parent b8edcf52b0
commit 6a50231698
6 changed files with 13 additions and 35 deletions

View File

@@ -391,7 +391,7 @@ server_init(struct server *server) {
static int
run_wait_server(void *data) {
struct server *server = data;
process_wait_noclose(server->process); // ignore exit code
process_wait(server->process, false); // ignore exit code
mutex_lock(server->mutex);
server->process_terminated = true;
@@ -447,7 +447,7 @@ server_start(struct server *server, const char *serial,
SDL_CreateThread(run_wait_server, "wait-server", server);
if (!server->wait_server_thread) {
process_terminate(server->process);
process_wait(server->process); // ignore exit code
process_wait(server->process, true); // ignore exit code
goto error2;
}