ignore interrupted select

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3182 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1998-11-06 19:46:23 +00:00
parent 5ab685e071
commit 30f7b9b0b8

View file

@ -62,6 +62,7 @@
#include <Foundation/NSNotificationQueue.h> #include <Foundation/NSNotificationQueue.h>
#include <Foundation/NSRunLoop.h> #include <Foundation/NSRunLoop.h>
#include <Foundation/NSThread.h> #include <Foundation/NSThread.h>
#include <Foundation/NSDebug.h>
#include <sys/types.h> #include <sys/types.h>
#ifndef __WIN32__ #ifndef __WIN32__
@ -1238,14 +1239,21 @@ static int debug_run_loop = 0;
printf ("\tNSRunLoop select returned %d\n", select_return); printf ("\tNSRunLoop select returned %d\n", select_return);
if (select_return < 0) if (select_return < 0)
{
if (errno == EINTR)
{
select_return = 0;
}
else
{ {
/* Some exceptional condition happened. */ /* Some exceptional condition happened. */
/* xxx We can do something with exception_fds, instead of /* xxx We can do something with exception_fds, instead of
aborting here. */ aborting here. */
perror ("[TcpInPort receivePacketWithTimeout:] select()"); perror ("[NSRunLoop receivePacketWithTimeout:] select()");
abort (); abort ();
} }
else if (select_return == 0) }
if (select_return == 0)
{ {
NSFreeMapTable (rfd_2_object); NSFreeMapTable (rfd_2_object);
NSFreeMapTable (wfd_2_object); NSFreeMapTable (wfd_2_object);