Opened 13 years ago

Closed 13 years ago

#114 closed defect (fixed)

libc: Unloading a DLL can break wait*() and other libc operations.

Reported by: bird Owned by: bird
Priority: normal Milestone: libc-0.6.2
Component: libc-frontend Version: 0.6
Severity: critical Keywords: _CRT_init _CRT_term initterm wait4 waitpid fork spawn
Cc:

Description

_CRT_term() and _CRT_init() don't do any reference counting and will terminate the CRT at the first _CRT_term() call instead of the last one. Since the CRT termination code involves telling the internal process waiter thread to quit, unloading a dll may cause all the wait*() functions to misbehave.

Change the CRT init/term code to do usage counting and fix b_processWait.c so that we can be reinitialized.

Change History (1)

comment:1 Changed 13 years ago by bird

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [2784] and [2785].

Note: See TracTickets for help on using tickets.