nelhage / reptyr

Reparent a running program to a new terminal
MIT License
5.77k stars 216 forks source link

macOS support #99

Open jab opened 5 years ago

jab commented 5 years ago

Since #83 (just titled "Mac") was closed via fe7a276, it's apparent that that issue was about failing with a better error message. Since it looks like there's no other issue tracking Mac support, I figured I'd create this one.

Thanks for releasing reptyr!

james-see commented 5 years ago

Seconding this. Would like support and wondering the LoE on doing this, seems like the Makefile could be adjusted to check and support the right gcc or am I missing something?

kevans91 commented 4 years ago

@jamesacampbell Unfortunately it's a bit more involved than that- reptyr gets pretty deep into kernel debugging facilities that vary, usually quite wildly, from kernel-to-kernel. In the Mac OS case, they seem to have a very limited form of ptrace(2) inherited from *BSD, but it contains almost none of the necessary functionality to be useful. You're looking at writing platform shims that look like ptrace to reptyr (because that part is abstracted away in platform/ glue) but use whatever facility MacOS provides at a minimum. =(

james-see commented 4 years ago

@kevans91 thanks for that, I definitely was missing that context. That seems like a heavy lift.