Projects
Browse Source     Search     Timeline     Wiki

Changeset 23562

Show
Ignore:
Timestamp:
2008-03-19 14:43:25 (5 months ago)
Author:
zarzycki@…
Message:

Don't accidentally machservice_delete() services that are managed with recv-rights.

Files:
1 modified

Legend:

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

    r23561 r23562  
    41844184 
    41854185        SLIST_FOREACH(ms, &j->machservices, sle) { 
    4186                 if (ms->recv && ms->isActive) { 
     4186                if (ms->recv && machservice_active(ms)) { 
    41874187                        return "Mach service is still active"; 
    41884188                } 
     
    47214721 
    47224722                LIST_FOREACH_SAFE(ms, &port_hash[HASH_PORT(port)], port_hash_sle, next_ms) { 
    4723                         if (ms->port == port) { 
     4723                        if (ms->port == port && !ms->recv) { 
    47244724                                machservice_delete(ms->job, ms, true); 
    47254725                        } 
     
    48124812        } 
    48134813 
    4814         if (ms->recv && job_assumes(j, !ms->isActive)) { 
     4814        if (ms->recv && job_assumes(j, !machservice_active(ms)) { 
    48154815                job_assumes(j, launchd_mport_close_recv(ms->port) == KERN_SUCCESS); 
    48164816        }