projects
/
tools
/
librpm-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
183c8fa
)
Add missing exit status check for waitpid() while executing scriptlets
author
Jindrich Novy
<jnovy@redhat.com>
Fri, 4 Mar 2011 03:43:32 +0000
(
04:43
+0100)
committer
Jindrich Novy
<jnovy@redhat.com>
Fri, 4 Mar 2011 03:43:32 +0000
(
04:43
+0100)
build/build.c
patch
|
blob
|
history
diff --git
a/build/build.c
b/build/build.c
index
5924ec6
..
a5cdc99
100644
(file)
--- a/
build/build.c
+++ b/
build/build.c
@@
-182,6
+182,13
@@
rpmRC doScript(rpmSpec spec, rpmBuildFlags what, const char *name,
pid = waitpid(child, &status, 0);
+ if (pid == -1) {
+ rpmlog(RPMLOG_ERR, _("Error executing scriptlet %s (%s)\n"),
+ scriptName, name);
+ rc = RPMRC_FAIL;
+ goto exit;
+ }
+
if (!WIFEXITED(status) || WEXITSTATUS(status)) {
rpmlog(RPMLOG_ERR, _("Bad exit status from %s (%s)\n"),
scriptName, name);