Projects
Browse Source     Search     Timeline     Wiki

Changeset 23623

Show
Ignore:
Timestamp:
2008-05-09 13:05:28 (5 months ago)
Author:
zarzycki@…
Message:

<rdar://problem/5915392> Drag and drop no longer works from Finder to TextEdit - problem in bootstrap_look_up2?

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/launchd/src/libbootstrap.c

    r23611 r23623  
    174174        static mach_port_t prev_sp; 
    175175        static name_t prev_name; 
     176        bool per_pid_lookup = flags & BOOTSTRAP_PER_PID_SERVICE; 
    176177        kern_return_t kr = 0; 
    177178        mach_port_t puc; 
    178179 
    179180        pthread_mutex_lock(&bslu2_lock); 
     181 
     182        if (per_pid_lookup) { 
     183                goto skip_cache; 
     184        } 
    180185 
    181186        if (prev_sp) { 
     
    190195        } 
    191196 
     197skip_cache: 
    192198        if ((kr = vproc_mig_look_up2(bp, service_name, sp, target_pid, flags)) != VPROC_ERR_TRY_PER_USER) { 
    193199                goto out; 
     
    202208 
    203209out: 
    204         if (kr == 0 && prev_sp == 0 && mach_port_mod_refs(mach_task_self(), *sp, MACH_PORT_RIGHT_SEND, 1) == 0) { 
     210        if (!per_pid_lookup && kr == 0 && prev_sp == 0 
     211                        && mach_port_mod_refs(mach_task_self(), *sp, MACH_PORT_RIGHT_SEND, 1) == 0) { 
    205212                /* We're going to hold on to a send right as a MRU cache */ 
    206213                prev_bp = bp;