diff options
| author | Andre Noll <maan@tuebingen.mpg.de> | 2026-07-22 19:43:18 +0200 |
|---|---|---|
| committer | Andre Noll <maan@tuebingen.mpg.de> | 2026-08-01 22:18:30 +0200 |
| commit | 542c4a5da15efc05342f99e092e6a2e2b831c126 (patch) | |
| tree | 9497c71cf0e2aa04d6980291862869f9921b148c /exec.c | |
| parent | a65650c6ecc4b5d1e1af9c856c0f96c9056b724f (diff) | |
This is shorter and conveys enough information. Rename the static para_exec()
as well.
Diffstat (limited to 'exec.c')
| -rw-r--r-- | exec.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -18,7 +18,8 @@ static void xdup2(int oldfd, int newfd) } /* Spawn a new process, redirect fds, have the child call execvp(2). */ -static int para_exec(pid_t *pid, const char *file, char *const *const args, int *fds) +static int fork_and_exec(pid_t *pid, const char *file, + char *const *const args, int *fds) { int ret, in[2] = {-1, -1}, out[2] = {-1, -1}, err[2] = {-1, -1}, null = -1, control[2]; @@ -154,7 +155,7 @@ err_out: * * \sa \ref create_argv(), null(4), pipe(2), dup2(2), fork(2), exec(3). */ -int para_exec_cmdline_pid(pid_t *pid, const char *cmdline, int *fds) +int xexec(pid_t *pid, const char *cmdline, int *fds) { int ret; char **argv; @@ -163,7 +164,7 @@ int para_exec_cmdline_pid(pid_t *pid, const char *cmdline, int *fds) if (ret < 0) return ret; PARA_INFO_LOG("cmdline: %s\n", cmdline); - ret = para_exec(pid, argv[0], argv, fds); + ret = fork_and_exec(pid, argv[0], argv, fds); free_argv(argv); return ret; } |
