From f53e056e903bff76ddf4e6d62288ddca6db3947e Mon Sep 17 00:00:00 2001 From: CaS Date: Mon, 25 Mar 2002 08:13:46 +0000 Subject: [PATCH] Quick hack to fix busy wait in run loop git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13228 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSRunLoop.m | 4 ++++ Source/NSTask.m | 2 +- Testing/client.m | 2 +- Testing/nsconnection_server.m | 2 ++ Tools/gdnc.m | 2 ++ Tools/gdomap.c | 2 +- 7 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index fedc880e8..31368a2d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-03-25 Richard Frith-Macdonald + + * Source/NSTask.m: GSCheckTasks() return NO under MINGW - + temporary hack to avoid busy wait in run loop. + 2002-03-22 Richard Frith-Macdonald * SSL/GNUmakefile: Remove -lobjc and -lgnustep-base from bundle diff --git a/Source/NSRunLoop.m b/Source/NSRunLoop.m index 46807d5d2..59da9cd7e 100644 --- a/Source/NSRunLoop.m +++ b/Source/NSRunLoop.m @@ -908,6 +908,8 @@ if (0) { } else { + timeout.tv_sec = -1; + timeout.tv_usec = -1; select_timeout = NULL; } @@ -1018,6 +1020,8 @@ if (0) { select_timeout = &timeout; } + // NSDebugMLLog(@"NSRunLoop", @"select timeout %d,%d", timeout.tv_sec, timeout.tv_usec); + select_return = select (fdEnd, &read_fds, &write_fds, &exception_fds, select_timeout); diff --git a/Source/NSTask.m b/Source/NSTask.m index a566d7668..67ed7fa6c 100644 --- a/Source/NSTask.m +++ b/Source/NSTask.m @@ -906,7 +906,7 @@ BOOL GSCheckTasks() { /* FIXME: Implement */ - return YES; + return NO; } - (void) gcFinalize diff --git a/Testing/client.m b/Testing/client.m index 2ce3ade67..f2153b98e 100644 --- a/Testing/client.m +++ b/Testing/client.m @@ -87,7 +87,7 @@ printf("oneway %d\n", _F_ONEWAY); } else p = [NSConnection rootProxyForConnectionWithRegisteredName:@"test2server" - host:nil]; + host: @"*"]; c = [p connectionForProxy]; [c setDelegate:auth]; [c setRequestTimeout:180.0]; diff --git a/Testing/nsconnection_server.m b/Testing/nsconnection_server.m index 794fbdbf0..6c4a20ffc 100644 --- a/Testing/nsconnection_server.m +++ b/Testing/nsconnection_server.m @@ -457,8 +457,10 @@ int main(int argc, char *argv[], char **env) exit(0); break; default: +#if 0 usage(argv[0]); exit(1); +#endif break; } diff --git a/Tools/gdnc.m b/Tools/gdnc.m index ba129f2e9..8222ddd93 100644 --- a/Tools/gdnc.m +++ b/Tools/gdnc.m @@ -855,7 +855,9 @@ main(int argc, char** argv, char** env) if (server != nil) { + CREATE_AUTORELEASE_POOL(pool); [[NSRunLoop currentRunLoop] run]; + RELEASE(pool); } exit(0); } diff --git a/Tools/gdomap.c b/Tools/gdomap.c index 0f582dba0..24f23c13a 100644 --- a/Tools/gdomap.c +++ b/Tools/gdomap.c @@ -4240,7 +4240,7 @@ printf( fprintf(stderr, "Registration will take place locally.\n"); } doregister(optarg, port, ptype); - return 0; + exit(0); case 'T': if (strcmp(optarg, "tcp_gdo") == 0)