rpms/jwhois/F-11 jwhois-4.0-select.patch, NONE, 1.1 jwhois.spec, 1.48, 1.49

vcrhonek vcrhonek at fedoraproject.org
Tue Jan 26 14:33:18 UTC 2010


Author: vcrhonek

Update of /cvs/pkgs/rpms/jwhois/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22393

Modified Files:
	jwhois.spec 
Added Files:
	jwhois-4.0-select.patch 
Log Message:
Use select to wait for input

jwhois-4.0-select.patch:
 whois.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- NEW FILE jwhois-4.0-select.patch ---
diff -ur jwhois-4.0.old/src/whois.c jwhois-4.0/src/whois.c
--- jwhois-4.0.old/src/whois.c	2007-06-26 03:00:29.000000000 -0400
+++ jwhois-4.0/src/whois.c	2009-04-29 11:42:56.000000000 -0400
@@ -115,6 +115,7 @@
   unsigned int count, start_count;
   int ret;
   char data[MAXBUFSIZE];
+  fd_set rfds;
 
   count = 0;
 
@@ -124,7 +125,15 @@
 
   do
     {
+      FD_ZERO(&rfds);
+      FD_SET(fd, &rfds);
+      ret = select(fd + 1, &rfds, NULL, NULL, NULL);
+
+      if (ret <= 0)
+        return -1;
+
       ret = read(fd, data, MAXBUFSIZE-1);
+
       if (ret >= 0)
 	{
 	  count += ret;


Index: jwhois.spec
===================================================================
RCS file: /cvs/pkgs/rpms/jwhois/F-11/jwhois.spec,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -p -r1.48 -r1.49
--- jwhois.spec	13 Mar 2009 08:09:21 -0000	1.48
+++ jwhois.spec	26 Jan 2010 14:33:18 -0000	1.49
@@ -1,6 +1,6 @@
 Name: jwhois
 Version: 4.0
-Release: 13%{?dist}
+Release: 14%{?dist}
 URL: http://www.gnu.org/software/jwhois/
 Source0: ftp://ftp.gnu.org/gnu/jwhois/jwhois-%{version}.tar.gz
 Patch0: jwhois-4.0-connect.patch
@@ -11,6 +11,7 @@ Patch4: jwhois-4.0-enum.patch
 Patch5: jwhois-4.0-fclose.patch
 Patch6: jwhois-4.0-conf_update.patch
 Patch7: jwhois-4.0-conf_update2.patch
+Patch8: jwhois-4.0-select.patch
 License: GPLv3
 Group: Applications/Internet
 Summary: Internet whois/nicname client
@@ -32,6 +33,7 @@ A whois client that accepts both traditi
 %patch5 -p1 -b .fclose
 %patch6 -p1 -b .conf_update
 %patch7 -p1 -b .conf_update2
+%patch8 -p1 -b .select
 
 iconv -f iso-8859-1 -t utf-8 < doc/sv/jwhois.1 > doc/sv/jwhois.1_
 mv doc/sv/jwhois.1_ doc/sv/jwhois.1
@@ -71,6 +73,10 @@ fi
 rm -fr $RPM_BUILD_ROOT
 
 %changelog
+* Tue Jan 26 2010 Vitezslav Crhonek <vcrhonek at redhat.com> - 4.0-14
+- Use select to wait for input (patch by Joshua Roys <joshua.roys at gtri.gatech.edu>)
+  Resolves: #469412
+
 * Fri Mar 13 2009 Vitezslav Crhonek <vcrhonek at redhat.com> - 4.0-13
 - jwhois.conf update for another few domains
   Resolves: #489161



More information about the scm-commits mailing list