rpms/jwhois/devel jwhois-4.0-select.patch, NONE, 1.1 jwhois.spec, 1.53, 1.54

vcrhonek vcrhonek at fedoraproject.org
Tue Jan 26 13:35:35 UTC 2010


Author: vcrhonek

Update of /cvs/pkgs/rpms/jwhois/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15710

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/devel/jwhois.spec,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -p -r1.53 -r1.54
--- jwhois.spec	3 Sep 2009 09:11:16 -0000	1.53
+++ jwhois.spec	26 Jan 2010 13:35:35 -0000	1.54
@@ -1,6 +1,6 @@
 Name: jwhois
 Version: 4.0
-Release: 18%{?dist}
+Release: 19%{?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
@@ -14,6 +14,7 @@ Patch7: jwhois-4.0-conf_update2.patch
 Patch8: jwhois-4.0-dotster.patch
 Patch9: jwhois-4.0-conf_update3.patch
 Patch10: jwhois-4.0-conf_update4.patch
+Patch11: jwhois-4.0-select.patch
 License: GPLv3
 Group: Applications/Internet
 Summary: Internet whois/nicname client
@@ -38,6 +39,7 @@ A whois client that accepts both traditi
 %patch8 -p1 -b .dotster
 %patch9 -p1 -b .conf_update3
 %patch10 -p1 -b .conf_update4
+%patch11 -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
@@ -81,6 +83,10 @@ fi
 rm -fr $RPM_BUILD_ROOT
 
 %changelog
+* Tue Jan 26 2010 Vitezslav Crhonek <vcrhonek at redhat.com> - 4.0-19
+- Use select to wait for input (patch by Joshua Roys <joshua.roys at gtri.gatech.edu>)
+  Resolves: #469412
+
 * Thu Sep  3 2009 Vitezslav Crhonek <vcrhonek at redhat.com> - 4.0-18
 - Fix errors installing jwhois with --excludedocs
   Resolves: #515940



More information about the scm-commits mailing list