projects
/
paraslash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fecdec_filter: Avoid potentially expensive pointer subtraction.
[paraslash.git]
/
exec.c
diff --git
a/exec.c
b/exec.c
index 86362c381fd8b3fe236caeddd4facec88130c901..86a483cfd8e704eda8907d7399e891f603633393 100644
(file)
--- a/
exec.c
+++ b/
exec.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2003-200
8
Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2003-200
9
Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
@@
-37,7
+37,7
@@
static int para_exec(pid_t *pid, const char *file, char *const *const args, int
if (fds[2] > 0 && pipe(err) < 0)
goto err_out;
if (!fds[0] || !fds[1] || !fds[2]) {
if (fds[2] > 0 && pipe(err) < 0)
goto err_out;
if (!fds[0] || !fds[1] || !fds[2]) {
- ret = para_open("/dev/null", O_RD
ONLY
, 42);
+ ret = para_open("/dev/null", O_RD
WR
, 42);
if (ret < 0)
goto err_out;
null = ret;
if (ret < 0)
goto err_out;
null = ret;
@@
-135,13
+135,11
@@
err_out:
*/
int para_exec_cmdline_pid(pid_t *pid, const char *cmdline, int *fds)
{
*/
int para_exec_cmdline_pid(pid_t *pid, const char *cmdline, int *fds)
{
- int
argc,
ret;
+ int ret;
char **argv;
char *tmp = para_strdup(cmdline);
char **argv;
char *tmp = para_strdup(cmdline);
- if (!tmp)
- exit(EXIT_FAILURE);
- argc = split_args(tmp, &argv, " \t");
+ split_args(tmp, &argv, " \t");
ret = para_exec(pid, argv[0], argv, fds);
free(argv);
free(tmp);
ret = para_exec(pid, argv[0], argv, fds);
free(argv);
free(tmp);