Split command into process and adb

The process API provides the system-specific implementation, the adb API
uses it to expose adb commands.
This commit is contained in:
Romain Vimont
2021-01-03 14:55:15 +01:00
parent aa8b571389
commit 4bd9da4c93
12 changed files with 97 additions and 80 deletions

View File

@@ -4,7 +4,7 @@
#include <string.h>
#include "config.h"
#include "command.h"
#include "adb.h"
#include "util/lock.h"
#include "util/log.h"
@@ -176,10 +176,10 @@ file_handler_stop(struct file_handler *file_handler) {
file_handler->stopped = true;
cond_signal(file_handler->event_cond);
if (file_handler->current_process != PROCESS_NONE) {
if (!cmd_terminate(file_handler->current_process)) {
if (!process_terminate(file_handler->current_process)) {
LOGW("Could not terminate install process");
}
cmd_simple_wait(file_handler->current_process, NULL);
process_simple_wait(file_handler->current_process, NULL);
file_handler->current_process = PROCESS_NONE;
}
mutex_unlock(file_handler->mutex);