[interprocess]Named mutex question
Is there a way to free a mutex which was locked by a process that died? I'm using a named mutex to synchronize access for some processes on a windows machine. One of those processes died while holding the mutex and now i can't get access to it (not even after killing every process that had any access to it). Is there a way to handle this situation through code?
Eugen Stoianovici wrote:
Is there a way to free a mutex which was locked by a process that died? I'm using a named mutex to synchronize access for some processes on a windows machine. One of those processes died while holding the mutex and now i can't get access to it (not even after killing every process that had any access to it). Is there a way to handle this situation through code?
Sorry, not for the moment. I'll need to think about an explicit unlock operation for some synchronization mechanisms for Boost 1.37. Ion
Ion Gaztañaga wrote:
Eugen Stoianovici wrote:
Is there a way to free a mutex which was locked by a process that died? I'm using a named mutex to synchronize access for some processes on a windows machine. One of those processes died while holding the mutex and now i can't get access to it (not even after killing every process that had any access to it). Is there a way to handle this situation through code?
Sorry, not for the moment. I'll need to think about an explicit unlock operation for some synchronization mechanisms for Boost 1.37.
Ion _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
The sad part is that i can't use that name for the mutex even after a reboot. If i can't remove it through code, is there an os task that could do this? Thanks, Eugen Stoianovici
Eugen Stoianovici wrote:
The sad part is that i can't use that name for the mutex even after a reboot. If i can't remove it through code, is there an os task that could do this?
named_mutex::remove() does not work? http://www.boost.org/doc/libs/1_35_0/doc/html/boost/interprocess/named_mutex...
Thanks, Eugen Stoianovici
Regards, Ion
I tried it, it doesn't work. I'll have to give the code another look and see if i missed something. I'll get back to you Thanks Ion Gaztañaga wrote:
Eugen Stoianovici wrote:
The sad part is that i can't use that name for the mutex even after a reboot. If i can't remove it through code, is there an os task that could do this?
named_mutex::remove() does not work?
http://www.boost.org/doc/libs/1_35_0/doc/html/boost/interprocess/named_mutex...
Thanks, Eugen Stoianovici
Regards,
Ion
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Eugen Stoianovici wrote:
I tried it, it doesn't work. I'll have to give the code another look and see if i missed something. I'll get back to you Thanks
Named mutexes in windows use shared memory emulation, so they should be created in your temp directory under boost_interprocess folder. See if it's still there. For example: C:\Documents and Settings\username\Local Configuration\Temp\boost_interprocess\xxxx Regards, Ion
Thanks, that was it. Ion Gaztañaga wrote:
Eugen Stoianovici wrote:
I tried it, it doesn't work. I'll have to give the code another look and see if i missed something. I'll get back to you Thanks
Named mutexes in windows use shared memory emulation, so they should be created in your temp directory under boost_interprocess folder. See if it's still there. For example:
C:\Documents and Settings\username\Local Configuration\Temp\boost_interprocess\xxxx
Regards,
Ion _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Eugen Stoianovici
-
Ion Gaztañaga