Expose inherit flag for process execution

Let the caller decide if stdout and stderr must be inherited on process
creation, i.e. if stdout and stderr of the child process should be
printed in the scrcpy console.

This allows to get output and errors for specific adb commands depending
on the context.
This commit is contained in:
Romain Vimont
2021-11-19 22:42:49 +01:00
parent c96dc6d2c4
commit 143bfc0395
5 changed files with 62 additions and 15 deletions

View File

@@ -5,8 +5,8 @@
#include "log.h"
enum sc_process_result
sc_process_execute(const char *const argv[], sc_pid *pid) {
return sc_process_execute_p(argv, pid, NULL, NULL, NULL);
sc_process_execute(const char *const argv[], sc_pid *pid, unsigned inherit) {
return sc_process_execute_p(argv, pid, inherit, NULL, NULL, NULL);
}
bool