Ticket #42 (closed bug: invalid)

Opened 3 years ago

Last modified 2 years ago

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:1 Changed 3 years ago by niam

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

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.