Projects
Browse Source     Search     Timeline     Wiki

Changeset 23621

Show
Ignore:
Timestamp:
05/05/08 16:31:03 (7 months ago)
Author:
zarzycki@…
Message:

<rdar://problem/5856084> 10A43: NFS trying to connect to servers after the VPN is down

Files:
1 modified

Legend:

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

    r23599 r23621  
    3838#include <sys/types.h> 
    3939#include <sys/stat.h> 
     40#include <sys/sysctl.h> 
    4041#include <sys/time.h> 
    4142#include <sys/proc.h> 
     
    148149        mach_msg_size_t mxmsgsz; 
    149150        pthread_attr_t attr; 
     151        pid_t p = getpid(); 
    150152 
    151153        launchd_assert((mainkq = kqueue()) != -1); 
     
    176178        launchd_assert(pthread_create(&demand_thread, &attr, mport_demand_loop, NULL) == 0); 
    177179        pthread_attr_destroy(&attr); 
     180 
     181        launchd_assumes(sysctlbyname("vfs.generic.noremotehang", NULL, NULL, &p, sizeof(p)) != -1); 
    178182} 
    179183 
     
    732736                launchd_assumes(launchd_set_bport(MACH_PORT_NULL) == KERN_SUCCESS); 
    733737        } else { 
     738                pid_t p = -getpid(); 
     739                launchd_assumes(sysctlbyname("vfs.generic.noremotehang", NULL, NULL, &p, sizeof(p)) != -1); 
     740 
    734741                launchd_assumes(sigprocmask(SIG_SETMASK, &emptyset, NULL) != -1); 
    735742        }