Changeset 23577
- Timestamp:
- 2008-03-27 14:57:51 (5 months ago)
- Location:
- trunk/launchd/src
- Files:
-
- 2 modified
-
launchd_core_logic.c (modified) (2 diffs)
-
libvproc.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/launchd/src/launchd_core_logic.c
r23576 r23577 2232 2232 if (j->shmem) { 2233 2233 job_assumes(j, munmap(j->shmem, getpagesize()) == 0); 2234 j->shmem = NULL; 2234 2235 } 2235 2236 … … 5447 5448 } 5448 5449 5450 if (unlikely(j->shmem)) { 5451 job_log(j, LOG_ERR, "Tried to setup shared memory more than once"); 5452 return BOOTSTRAP_NOT_PRIVILEGED; 5453 } 5454 5449 5455 size_of_page_orig = size_of_page = getpagesize(); 5450 5456 -
trunk/launchd/src/libvproc.c
r23574 r23577 55 55 static int64_t cached_pid = -1; 56 56 static struct vproc_shmem_s *vproc_shmem; 57 static pthread_once_t shmem_inited = PTHREAD_ONCE_INIT; 57 58 58 59 static void … … 95 96 96 97 if (unlikely(vproc_shmem == NULL)) { 97 vproc_shmem_init();98 if ( vproc_shmem == NULL) {98 int po_r = pthread_once(&shmem_inited, vproc_shmem_init); 99 if (po_r != 0 || vproc_shmem == NULL) { 99 100 return; 100 101 } … … 148 149 149 150 if (unlikely(vproc_shmem == NULL)) { 150 vproc_shmem_init();151 if ( vproc_shmem == NULL) {151 int po_r = pthread_once(&shmem_inited, vproc_shmem_init); 152 if (po_r != 0 || vproc_shmem == NULL) { 152 153 return NULL; 153 154 }

