-
Notifications
You must be signed in to change notification settings - Fork 581
support threads on OSX #848
base: master
Are you sure you want to change the base?
Conversation
Introduced from hishamhm@3383d8e (2.0.0) but never used.
Thank you! This is working as advertised! (macOS Mojave) It does, however, need |
Yes, in order to remove the sudo requirement, there is another OSX API that needs to be used, and the application needs to be signed - possible but a lot more work in the build/packaging phase |
Hi robaho! This is exciting, thanks! Do you know what that other API you mentioned is, by chance (the one that requires signing)? |
@joshuawarner32 not really a different API, but a different process. see http://os-tres.net/blog/2010/02/17/mac-os-x-and-task-for-pid-mach-call/ It is probably easier to set the setuid bit on the executable like 'top' does. |
Oh, hmm... based on my (brief, incomplete) testing, it looks like calling Signing could probably work - but having people install a self-signed code signing cert sounds kinda sketchy. |
The code uses task_for_pid now and I don’t have SIP disabled and it works for me. |
Ah, interesting. I was testing against Google Chrome, which seems to have some additional anti-debugging protections enabled, and does require disabling SIP before listing the threads. When I try other processes on my system, they generally work fine. |
Yea, it certainly isn’t easy to find official docs on this stuff, probably intentionally. |
It's a bit rough, because the OSX thread ID is not a PID, but it does work.