Get a list of mutex?

元气小坏坏 提交于 2019-12-31 13:12:03

问题


A program creates a mutex as part of its start-up. I don't know the format of this mutex so I wondered if there is a way to get a list of all non-abandoned mutex, open the program, get a new list and see if I can find the mutex by removing all duplicate entries.

Is there a way to get this list?


回答1:


If you're on Windows, WinObj can show you named mutexes. Or you can use Process Explorer to find out which objects a specific process has open.




回答2:


If you have WinObj.exe it is likely that you also have handle.exe which is also from the SysInternals-Suite.

Occasionally I found

handle -a |findstr /C:Mutant /C:pid:

to be helpful. This also displays unnamed Mutexes.

BTW: If you dont want to rely on the output format compatibility (I used version v3.51) you should capture the whole output of handle -a and search manually or use

handle -a -p %YOUR_PID%


来源:https://stackoverflow.com/questions/1389868/get-a-list-of-mutex

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!