aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-01-17 10:05:12 +0000
committerFrancois Pons <fpons@mandriva.com>2002-01-17 10:05:12 +0000
commit492b556e340f2722ad860950ed0245e5ea9335ba (patch)
treeda7dec00cbed43275ab4fac886d1050c98aefccc
parente2d2e1cd01b98d736652443c65fd42a00d1d5ecb (diff)
downloadrpmtools-4.0.6.tar
rpmtools-4.0.6.tar.gz
rpmtools-4.0.6.tar.bz2
rpmtools-4.0.6.tar.xz
rpmtools-4.0.6.zip
4.0-6mdk4.0.6
-rw-r--r--rpmtools.pm1
-rw-r--r--rpmtools.spec6
-rw-r--r--rpmtools.xs13
3 files changed, 18 insertions, 2 deletions
diff --git a/rpmtools.pm b/rpmtools.pm
index 10b0475..3695d73 100644
--- a/rpmtools.pm
+++ b/rpmtools.pm
@@ -118,7 +118,6 @@ sub read_hdlists {
if (my $pid = fork()) {
close O;
- select(undef, undef, undef, 0.05);
push @names, rpmtools::_parse_(fileno *I, $params->{flags}, $params->{info}, $params->{provides});
close I;
diff --git a/rpmtools.spec b/rpmtools.spec
index 5229873..82ad4b4 100644
--- a/rpmtools.spec
+++ b/rpmtools.spec
@@ -1,5 +1,5 @@
%define name rpmtools
-%define release 5mdk
+%define release 6mdk
# do not modify here, see Makefile in the CVS
%define version 4.0
@@ -54,6 +54,10 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/perl5/man/*/*
%changelog
+* Thu Jan 17 2002 François Pons <fpons@mandrakesoft.com> 4.0-6mdk
+- modified delay management in respect to rpmlib, use
+ select to wait for input before giving up to rpmlib.
+
* Wed Jan 16 2002 François Pons <fpons@mandrakesoft.com> 4.0-5mdk
- added little delay when reading hdlist.
diff --git a/rpmtools.xs b/rpmtools.xs
index fc528e7..e73998d 100644
--- a/rpmtools.xs
+++ b/rpmtools.xs
@@ -3,8 +3,11 @@
#include "XSUB.h"
#include <sys/utsname.h>
+#include <sys/select.h>
+#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <unistd.h>
#include <fcntl.h>
#undef Fflush
@@ -487,6 +490,16 @@ _parse_(fileno_or_rpmfile, flag, info, ...)
int i;
if (SvIOK(fileno_or_rpmfile)) {
+ int d = SvIV(fileno_or_rpmfile);
+ fd_set readfds;
+ struct timeval timeout;
+
+ FD_ZERO(&readfds);
+ FD_SET(d, &readfds);
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+ select(d+1, &readfds, NULL, NULL, &timeout);
+
fd = fdDup(SvIV(fileno_or_rpmfile));
fd_is_hdlist = 1;
} else {