mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Bugfixes for report by stark@easynet.fr
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3526 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0d788a78c2
commit
3d5bd13a52
3 changed files with 37 additions and 20 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,27 +1,29 @@
|
|||
Tue Jan 5 16:20:00 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
Tue Jan 5 20:30:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* configure.in: New stuff for making byte-order and type-size
|
||||
information available in GSConfig.h
|
||||
* src/NSTask.h: Set process group for child process and preliminary
|
||||
code for keeping track of active child tasks.
|
||||
* src/NSTask.m: Set process group for child process and preliminary
|
||||
code for keeping track of active child tasks and handlign sigchld.
|
||||
* src/UnixFileHandle.m: Modified ([-closeFile]) to send notifications
|
||||
if there are any asynchronous operations in progress.
|
||||
* src/include/Foundation.h: include GSConfig.h
|
||||
* src/include/NSObject.h: include GSConfig.h
|
||||
* src/include/NSByteOrder.h: Use GS_WORDS_BIGENDIAN from GSConfig.h
|
||||
* src/include/GSConfig.h.in: Add typedefs for types with known size.
|
||||
* src/include/config.h.in: Added HAVE_SETPGID and HAVE_SETPGRP
|
||||
|
||||
Tue Jan 5 9:45:00 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
Tue Jan 5 9:45:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* src/NSTask.m: Workaround for bug in linux waitpid(), general
|
||||
tidying, clean up descriptors in child process.
|
||||
* src/NSString.m: ([-dataUsingEncoding:]) fixed memory leak.
|
||||
|
||||
Mon Jan 4 15:35:00 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
Mon Jan 4 15:35:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* src/NSInvocation.m: Fix for machines that pass structures by ref.
|
||||
* mframe/powerpc/linux-gnu: Machine definition added for powerpc.
|
||||
|
||||
Mon Jan 4 9:05:00 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
Mon Jan 4 9:05:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* src/o_vscanf.c: Don't make local copy of va_list parameter by
|
||||
assignment - doesn't work on machines where a va_list is an array.
|
||||
|
|
|
@ -67,6 +67,7 @@ static void handleSignal(int sig)
|
|||
if (WIFEXITED(status))
|
||||
{
|
||||
NSTask *t;
|
||||
|
||||
[tasksLock lock];
|
||||
t = (NSTask*)NSMapGet(activeTasks, (void*)result);
|
||||
[tasksLock unlock];
|
||||
|
@ -93,7 +94,7 @@ static void handleSignal(int sig)
|
|||
}
|
||||
[gnustep_global_lock unlock];
|
||||
|
||||
signal(SIGCHLD, SIG_IGN);
|
||||
signal(SIGCHLD, handleSignal);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -507,11 +508,6 @@ static void handleSignal(int sig)
|
|||
#else
|
||||
kill(-taskId, SIGTERM);
|
||||
#endif
|
||||
|
||||
if (hasNotified == NO)
|
||||
{
|
||||
[self _sendNotification];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) waitUntilExit
|
||||
|
|
|
@ -898,19 +898,37 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
[NSException raise: NSFileHandleOperationException
|
||||
format: @"attempt to close closed file"];
|
||||
|
||||
[self ignoreReadDescriptor];
|
||||
[self ignoreWriteDescriptor];
|
||||
|
||||
[readInfo release];
|
||||
readInfo = nil;
|
||||
[writeInfo removeAllObjects];
|
||||
|
||||
(void)close(descriptor);
|
||||
descriptor = -1;
|
||||
acceptOK = NO;
|
||||
connectOK = NO;
|
||||
readOK = NO;
|
||||
writeOK = NO;
|
||||
|
||||
/*
|
||||
* Clear any pending operations on the file handle, sending
|
||||
* notifications if necessary.
|
||||
*/
|
||||
if (readInfo)
|
||||
{
|
||||
[readInfo setObject: @"File handle closed locally"
|
||||
forKey: GSFileHandleNotificationError];
|
||||
[self postReadNotification];
|
||||
}
|
||||
else
|
||||
[self ignoreReadDescriptor];
|
||||
|
||||
if ([writeInfo count])
|
||||
{
|
||||
NSMutableDictionary *info = [writeInfo objectAtIndex: 0];
|
||||
|
||||
[info setObject: @"File handle closed locally"
|
||||
forKey: GSFileHandleNotificationError];
|
||||
[self postWriteNotification];
|
||||
[writeInfo removeAllObjects];
|
||||
}
|
||||
else
|
||||
[self ignoreWriteDescriptor];
|
||||
}
|
||||
|
||||
- (void)synchronizeFile
|
||||
|
@ -991,7 +1009,8 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
postingStyle: NSPostASAP
|
||||
coalesceMask: NSNotificationNoCoalescing
|
||||
forModes: modes];
|
||||
[self watchWriteDescriptor]; /* In case of queued writes. */
|
||||
if ((writeOK || connectOK) && [writeInfo count] > 0)
|
||||
[self watchWriteDescriptor]; /* In case of queued writes. */
|
||||
}
|
||||
|
||||
- (BOOL)readInProgress
|
||||
|
|
Loading…
Reference in a new issue