Chard wrote:
Does calling named_mutex::remove() have consistent cross-platform behaviour?
No until the next Boost version. The UNIX behaviour will be the chosen behaviour: you can remove in-use named resources (named mutex, shared memory...)
On the Windows platform, I've found I can call named_mutex::remove() at start up, which seems to clean up the named_mutex if it is orphaned, or just do nothing if another, active, process has a lock - exactly the behaviour I require.
However, is this platform independent, and a suitable technique?
No, it's not portable. I think you should use file locks which are automatically unlocked when a process dies. However, take in care that to achieve portable file locks you have several restrictions that I think you can avoid in your case: http://www.boost.org/doc/libs/1_38_0/doc/html/interprocess/synchronization_m... Best, Ion