Ticket #42 (closed bug: invalid)
process synchronization doesn't work properly if object is constructed in parent process and used as-is in child
| Reported by: | niam | Owned by: | niam |
|---|---|---|---|
| Priority: | high | Milestone: | 0.12.0 |
| Component: | Version: | trunk | |
| Severity: | block | Keywords: | |
| Cc: |
Description
If the synchronization object was created in parent process or as a global one and was used in child process child process won't work with the original one.
Change History
comment:2 Changed 3 years ago by niam
Investigation showed this is not reproducible for posix semaphores in current *nix environment no extra checks needed. Valid handle returned from sem_open is valid for children processes.
XSI semaphores semget returns unique id that is valid even between different processes trees.
Note: See
TracTickets for help on using
tickets.

The constructor should record the pid of the creator and reinit the synchronization mechanism if the pid was changed.