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:
61c0a71
)
Wait for popen() to finish before passing to isSpecFile()
author
Panu Matilainen
<pmatilai@redhat.com>
Fri, 4 Apr 2008 11:33:45 +0000
(14:33 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Fri, 4 Apr 2008 11:41:40 +0000
(14:41 +0300)
build.c
patch
|
blob
|
history
diff --git
a/build.c
b/build.c
index
1799955
..
f00e98d
100644
(file)
--- a/
build.c
+++ b/
build.c
@@
-136,9
+136,9
@@
static char * getTarSpec(const char *arg)
if (!(fp = popen(cmd, "r"))) {
rpmlog(RPMLOG_ERR, _("Failed to open tar pipe: %m\n"));
} else {
- gotspec = fgets(tarbuf, sizeof(tarbuf) - 1, fp) &&
- isSpecFile(tmpSpecFile);
+ char *fok = fgets(tarbuf, sizeof(tarbuf) - 1, fp);
pclose(fp);
+ gotspec = (fok != NULL) && isSpecFile(tmpSpecFile);
}
if (!gotspec)