[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #40612] NSTaskDidTerminateNotification posted late or never
From: |
Larry Campbell |
Subject: |
[bug #40612] NSTaskDidTerminateNotification posted late or never |
Date: |
Sun, 17 Nov 2013 21:10:51 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9) AppleWebKit/537.71 (KHTML, like Gecko) Version/7.0 Safari/537.71 |
Follow-up Comment #1, bug #40612 (project gnustep):
Fixes (based on gnustep 1.24.0):
*** NSRunLoop.m.orig Sun Nov 17 19:48:08 2013
--- NSRunLoop.m Sun Nov 17 20:03:44 2013
***************
*** 1240,1245 ****
--- 1240,1248 ----
NSAssert(mode != nil, NSInvalidArgumentException);
+ GSPrivateCheckTasks();
+ GSPrivateNotifyASAP(mode);
+
/* Find out how long we can wait before first limit date. */
d = [self limitDateForMode: mode];
if (d == nil)
*** NSTask.m.orig Sun Nov 17 18:18:09 2013
--- NSTask.m Sun Nov 17 20:47:04 2013
***************
*** 855,862 ****
- (void) waitUntilExit
{
NSTimer *timer = nil;
! while ([self isRunning])
{
NSDate *limit;
--- 855,865 ----
- (void) waitUntilExit
{
NSTimer *timer = nil;
+ int extra = 1; // call run loop once more after termination so
notifications are posted promptly
! IF_NO_GC([[self retain] autorelease];) // in case notification releases
self
!
! while ([self isRunning] || extra-- > 0)
{
NSDate *limit;
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40612>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/