This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

set_robust_list() not called for forked processes ?


Hello,

I am using process shared pthread mutexes allocated in shared memory
to synchronize across distinct single threaded processes.
Some of these processes may have a parent-child relationship, with no
execve'ing involved after the fork. I have noticed that if a child
exits ungracefully holding process shared mutexes the kernel doesn't
wake up waiter processes. I straced the forked off child processes
right after the fork, and saw that they don't seem to call
set_robust_list(). Looking at the nptl/pthread code it looks like
set_robust_list
is only called in nptl-init.c (probably when the library is first
loaded), and when a new thread is created via pthread_create. Looks
like
nptl is not handling the fork case. Is that true ? Is there an easy
way to get my forked processes to call set_robust_list() without
execving
after the fork ?

Thank You,
Monoreet.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]