diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-04-04 14:33:45 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-04-04 14:41:40 +0300 |
commit | 6a766c00bfd488bb2c703910efc386bf95e6af05 (patch) | |
tree | c27f3e0250b8ce0dc038dff9ea0070a8cf88277e /build.c | |
parent | 61c0a71059d5e5a5782018505c70d88299ac3ede (diff) | |
download | librpm-tizen-6a766c00bfd488bb2c703910efc386bf95e6af05.tar.gz librpm-tizen-6a766c00bfd488bb2c703910efc386bf95e6af05.tar.bz2 librpm-tizen-6a766c00bfd488bb2c703910efc386bf95e6af05.zip |
Wait for popen() to finish before passing to isSpecFile()
Diffstat (limited to 'build.c')
-rw-r--r-- | build.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |