Rename process_simple_wait to process_wait
Adding "simple" in the function name brings no benefit.
This commit is contained in:
parent
cc6f5020d8
commit
821c175730
6 changed files with 7 additions and 7 deletions
|
@ -179,7 +179,7 @@ file_handler_stop(struct file_handler *file_handler) {
|
|||
if (!process_terminate(file_handler->current_process)) {
|
||||
LOGW("Could not terminate install process");
|
||||
}
|
||||
process_simple_wait(file_handler->current_process, NULL);
|
||||
process_wait(file_handler->current_process, NULL);
|
||||
file_handler->current_process = PROCESS_NONE;
|
||||
}
|
||||
mutex_unlock(file_handler->mutex);
|
||||
|
|
|
@ -392,7 +392,7 @@ server_init(struct server *server) {
|
|||
static int
|
||||
run_wait_server(void *data) {
|
||||
struct server *server = data;
|
||||
process_simple_wait(server->process, NULL); // ignore exit code
|
||||
process_wait(server->process, NULL); // ignore exit code
|
||||
|
||||
mutex_lock(server->mutex);
|
||||
server->process_terminated = true;
|
||||
|
@ -448,7 +448,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_simple_wait(server->process, NULL); // ignore exit code
|
||||
process_wait(server->process, NULL); // ignore exit code
|
||||
goto error2;
|
||||
}
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ process_terminate(pid_t pid) {
|
|||
}
|
||||
|
||||
bool
|
||||
process_simple_wait(pid_t pid, int *exit_code) {
|
||||
process_wait(pid_t pid, int *exit_code) {
|
||||
int status;
|
||||
int code;
|
||||
if (waitpid(pid, &status, 0) == -1 || !WIFEXITED(status)) {
|
||||
|
|
|
@ -60,7 +60,7 @@ process_terminate(HANDLE handle) {
|
|||
}
|
||||
|
||||
bool
|
||||
process_simple_wait(HANDLE handle, DWORD *exit_code) {
|
||||
process_wait(HANDLE handle, DWORD *exit_code) {
|
||||
DWORD code;
|
||||
if (WaitForSingleObject(handle, INFINITE) != WAIT_OBJECT_0
|
||||
|| !GetExitCodeProcess(handle, &code)) {
|
||||
|
|
|
@ -9,7 +9,7 @@ process_check_success(process_t proc, const char *name) {
|
|||
return false;
|
||||
}
|
||||
exit_code_t exit_code;
|
||||
if (!process_simple_wait(proc, &exit_code)) {
|
||||
if (!process_wait(proc, &exit_code)) {
|
||||
if (exit_code != NO_EXIT_CODE) {
|
||||
LOGE("\"%s\" returned with value %" PRIexitcode, name, exit_code);
|
||||
} else {
|
||||
|
|
|
@ -48,7 +48,7 @@ process_terminate(process_t pid);
|
|||
|
||||
// wait and close the process
|
||||
bool
|
||||
process_simple_wait(process_t pid, exit_code_t *exit_code);
|
||||
process_wait(process_t pid, exit_code_t *exit_code);
|
||||
|
||||
// convenience function to wait for a successful process execution
|
||||
// automatically log process errors with the provided process name
|
||||
|
|
Loading…
Reference in a new issue