Changeset 174 for trunk/src/dnmalloc.c
- Timestamp:
- Aug 27, 2008, 5:40:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/dnmalloc.c
r173 r174 1508 1508 pthread_mutex_unlock(&mALLOC_MUTEx); 1509 1509 } 1510 void dnmalloc_fork_child(void) { 1510 void dnmalloc_fork_child(void) { 1511 int rc; 1511 1512 #ifdef __GLIBC__ 1512 1513 if (dnmalloc_use_mutex) 1513 pthread_mutex_init(&mALLOC_MUTEx, NULL); 1514 { 1515 pthread_mutex_unlock (&mALLOC_MUTEx); 1516 pthread_mutex_destroy(&mALLOC_MUTEx); 1517 rc = pthread_mutex_init(&mALLOC_MUTEx, NULL); 1518 } 1514 1519 #else 1515 1520 if (dnmalloc_use_mutex) 1516 pthread_mutex_unlock(&mALLOC_MUTEx); 1517 #endif 1521 rc = pthread_mutex_unlock(&mALLOC_MUTEx); 1522 #endif 1523 if (rc != 0) 1524 { 1525 fputs("fork_child failed", stderr); 1526 _exit(EXIT_FAILURE); 1527 } 1518 1528 } 1519 1529 static int dnmalloc_mutex_lock(pthread_mutex_t *mutex)
Note:
See TracChangeset
for help on using the changeset viewer.