Environment
- Ubuntu 16.04
- C++
Use-case
- Process A, constantly starting and stopping
- B, a Child process of A, forked only once and is running 24x7
- In other words: A starts, spawns B, A dies ( B orphan ), A start again ( at this point I don;t want B to be spawned again )
Problem at hand
How can I make sure that only a single instance of process B is being created, that is, although process A constantly start and stop.