This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

xwinclip dies with select failure


I have found that xwinclip dies if I try to put it into the background:

	msp-arjuno 398: xwinclip
	UnicodeSupport - Windows NT/2000/XP

	Suspended
	msp-arjuno 399: bg
	[1]    xwinclip &
	Call to select () failed: -1.  Bailing.

The most likely reason is that the EINTR return from select() is not
being ignored.  This diff should fix it, but I do not have a development
environment loaded:

--- xwinclip.c.~1~	2003-01-12 20:27:22.000000000 -0500
+++ xwinclip.c	2003-03-23 16:26:39.000000000 -0500
@@ -439,7 +439,10 @@
 			NULL);		/* No timeout */
       if (iReturn <= 0)
 	{
-	  printf ("Call to select () failed: %d.  Bailing.\n", iReturn);
+	  if (errno == EINTR)
+	    continue;
+	  fprintf(stderr, "Call to select () failed: %s.  Bailing.\n",
+	          strerror(errno));
 	  break;
 	}
       
Thanks.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]