Check process success locally for adb commands

Remove sc_process_check_success() from the process API, it is too
specific.
This commit is contained in:
Romain Vimont
2021-11-25 09:37:53 +01:00
parent 680d2cc940
commit 904f0ae61e
5 changed files with 44 additions and 62 deletions

View File

@@ -1,26 +1,5 @@
#include "process_intr.h"
bool
sc_process_check_success_intr(struct sc_intr *intr, sc_pid pid,
const char *name, bool close) {
if (!sc_intr_set_process(intr, pid)) {
// Already interrupted
return false;
}
// Always pass close=false, interrupting would be racy otherwise
bool ret = sc_process_check_success(pid, name, false);
sc_intr_set_process(intr, SC_PROCESS_NONE);
if (close) {
// Close separately
sc_process_close(pid);
}
return ret;
}
ssize_t
sc_pipe_read_intr(struct sc_intr *intr, sc_pid pid, sc_pipe pipe, char *data,
size_t len) {