From 492b556e340f2722ad860950ed0245e5ea9335ba Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Thu, 17 Jan 2002 10:05:12 +0000 Subject: 4.0-6mdk --- rpmtools.pm | 1 - rpmtools.spec | 6 +++++- rpmtools.xs | 13 +++++++++++++ 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 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 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 +#include +#include #include #include +#include #include #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 { -- cgit v1.2.1