summaryrefslogtreecommitdiffstats
path: root/trunk/src/execle_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/execle_open.c')
-rw-r--r--trunk/src/execle_open.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/trunk/src/execle_open.c b/trunk/src/execle_open.c
index 52872aa..2ee5cbc 100644
--- a/trunk/src/execle_open.c
+++ b/trunk/src/execle_open.c
@@ -50,7 +50,7 @@ execve_open (const char *path, char *const argv[], char *const envp[])
return NULL;
}
- switch (vfork ())
+ switch (pid = vfork ())
{
case -1:
error (0, errno, "Could not run %s", path);
@@ -64,6 +64,7 @@ execve_open (const char *path, char *const argv[], char *const envp[])
}
dup2 (1, 2);
execve (path, argv, envp);
+ error (0, errno, "Could not run %s", path);
_exit (127);
}