Factorize common impl of process_execute()
Both implementations are the same. Move them to the common process.c.
This commit is contained in:
parent
e80e6631e4
commit
7e93abcf6d
3 changed files with 5 additions and 10 deletions
|
@ -153,11 +153,6 @@ process_execute_redirect(const char *const argv[], pid_t *pid, int *pipe_stdin,
|
|||
return res;
|
||||
}
|
||||
|
||||
enum process_result
|
||||
process_execute(const char *const argv[], pid_t *pid) {
|
||||
return process_execute_redirect(argv, pid, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
bool
|
||||
process_terminate(pid_t pid) {
|
||||
if (pid <= 0) {
|
||||
|
|
|
@ -142,11 +142,6 @@ error_close_stdin:
|
|||
return ret;
|
||||
}
|
||||
|
||||
enum process_result
|
||||
process_execute(const char *const argv[], HANDLE *handle) {
|
||||
return process_execute_redirect(argv, handle, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
bool
|
||||
process_terminate(HANDLE handle) {
|
||||
return TerminateProcess(handle, 1);
|
||||
|
|
|
@ -3,6 +3,11 @@
|
|||
#include <libgen.h>
|
||||
#include "log.h"
|
||||
|
||||
enum process_result
|
||||
process_execute(const char *const argv[], process_t *pid) {
|
||||
return process_execute_redirect(argv, pid, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
bool
|
||||
process_check_success(process_t proc, const char *name, bool close) {
|
||||
if (proc == PROCESS_NONE) {
|
||||
|
|
Loading…
Reference in a new issue