aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-01-11 12:40:11 -0500
committerAnthony G. Basile <blueness@gentoo.org>2014-01-11 12:40:11 -0500
commit2ee2285c6cffcb2749224ee84e6ca9a27a40af92 (patch)
treec519389b24966b11e4a30dd9c05c635e66dc7fd0
parentmisc/install.wrapper.c: address comments #47 and #48, Bug #465000 (diff)
downloadelfix-2ee2285c6cffcb2749224ee84e6ca9a27a40af92.tar.gz
elfix-2ee2285c6cffcb2749224ee84e6ca9a27a40af92.tar.bz2
elfix-2ee2285c6cffcb2749224ee84e6ca9a27a40af92.zip
misc/install.wrapper.c: fix parent exit status
-rw-r--r--misc/install.wrapper.c/install.wrapper.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/misc/install.wrapper.c/install.wrapper.c b/misc/install.wrapper.c/install.wrapper.c
index 441b7b8..d96fb37 100644
--- a/misc/install.wrapper.c/install.wrapper.c
+++ b/misc/install.wrapper.c/install.wrapper.c
@@ -266,12 +266,12 @@ main(int argc, char* argv[], char* envp[])
case 0:
install = which(dirname(argv[0]));
execve(install, argv, envp);
- /* When the child exists, the kernel will free(install) for us.
- * Also, no break since we never return from execve.
- */
+ /* The kernel will free(install) for us. */
+ err(1, "execve() failed");
default:
wait(&status);
+ status = WEXITSTATUS(status);
/* If all the targets are directories, do nothing. */
if (opts_directory)
@@ -314,7 +314,6 @@ main(int argc, char* argv[], char* envp[])
return status;
}
-
/* We should never get here */
return EXIT_FAILURE;
}