问题
I'd like to use named mutex at linux for multi process.
I searched at google and find some APIs. But, it's hard to break out the coding. I found two apis and it looks set name and be shared between processes.
pthread_mutexattr_setname_np
pthread_mutexattr_setpshared(&mtx_attr, PTHREAD_PROCESS_SHARED);
Could somebody give me hint or example?
来源:https://stackoverflow.com/questions/46313748/how-to-use-named-mutex-at-linux