0

I have a process P7 and a process P5. Each process have a number of threads. The thread T5.3 must end before T7.2. I've tried with sem_wait and sem_post but it did not work. How can I communicate between threads of different process?

tsorina
  • 93
  • 7

1 Answers1

0

One way is to use POSIX threads primitives that can be configured to be shared between processes. See e.g. accepted answer to this question: sharing pthread mutex and condvar over process boundaries

Se also Manpage for pthread_condattr_getpshared, pthread_condattr_setpshared

Erik Alapää
  • 2,585
  • 1
  • 14
  • 25