Ignore:
Timestamp:
05/16/06 18:44:19 (18 years ago)
Author:
rchin
Message:

Fixed problem with F-Script leaking file handles (caused F-Script to not be able to inject into applications after a certain number of running apps had been launched). The problem was in appIsPEF calling open(2) but not close(2) before returning.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/F-Script Anywhere/Source/FSAAppList.m

    r221 r222  
    132132{
    133133    [tableView reloadData];
    134     [self tableView: tableView shouldSelectRow: [tableView selectedRow]];
     134//    [self tableView: tableView shouldSelectRow: [tableView selectedRow]];
    135135}
    136136
     
    143143{
    144144    DeVercruesseProcess *app = [self _applicationForPID: pid];
    145     [patchingApps removeObject: app];
    146     [patchedApps addObject: app];
     145    if(app){
     146        [patchingApps removeObject: app];
     147        [patchedApps addObject: app];
     148    }
    147149    [self _processStatusChanged];
    148150}
     
    170172        return NO;
    171173   
    172     if (read(fd, &pefHeader, sizeof(pefHeader)) != sizeof(pefHeader))
     174    if (read(fd, &pefHeader, sizeof(pefHeader)) != sizeof(pefHeader)){
     175        close(fd);
    173176        return NO;
     177    } else
     178        close(fd);
    174179   
    175180    if (pefHeader.tag1 != kPEFTag1 || pefHeader.tag2 != kPEFTag2)
     
    229234     }
    230235     */
    231    
    232236    if ( ![app isBackgroundOnly] &&
    233237         ( ( [app isCocoa] && ![self appIsPEF: app]) ||
     
    461465    id e = [cocoaApps objectEnumerator];
    462466    while(anApp = [e nextObject]){
    463         if([alwaysApps containsObject:[anApp name]] && ![patchedApps containsObject:anApp]){
     467        if([alwaysApps containsObject:[anApp name]]){
    464468            [NSApp installBundleInAppWithPID:[anApp pid]];
    465469        }
Note: See TracChangeset for help on using the changeset viewer.