nelhage / reptyr

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

Mac #83

Closed theideasmith closed 7 years ago

theideasmith commented 7 years ago

Hi, This tool looks awesome. I'm excited to salvage a certain important process that I have disowned a while ago and have left running. I'm on a mac and when I try to run make I get

/usr/local/bin/gcc-6 -Wall -Werror -D_GNU_SOURCE -g    -c -o reptyr.o reptyr.c
In file included from reptyr.c:37:0:
platform/platform.h:60:25: error: field 'addr' has incomplete type
         struct sockaddr addr;
                         ^~~~
platform/platform.h:61:28: error: field 'addr_un' has incomplete type
         struct sockaddr_un addr_un;
                            ^~~~~~~
make: *** [reptyr.o] Error 1

Any ideas?

nelhage commented 7 years ago

We don't support macOS, unfortunately. Probably that should be a better error, though, at least …

kutsan commented 7 years ago

@nelhage Will you support macOS in future? Probably not but just asking.

nelhage commented 7 years ago

I've got no plans to, as I don't use macOS and am not familiar with its terminal and debugging APIs and what it would take to implement reptyr. I'd potentially be open to a PR if such an expert is interested.

ericbaranowski commented 7 years ago

The only thing I can really find that does anything close to reattaching a process on MacOS is from this repo tmux-MacOSX-pasteboard, I don't really know that much about C, but I'll try to do some comparing between the two programs

tbodt commented 7 years ago

The macos debugging api is much more annoying and less well documented than on linux.

alexreg commented 6 years ago

I'd definitely be interested in a macOS version too, and would submit a PR, but have no idea what part of the codebase would even need to be changed!

tbodt commented 6 years ago

@alexreg You'd have to add a new directory under platform.

alexreg commented 6 years ago

No existing code would have to be changed?

tbodt commented 6 years ago

Likely not, except platform/platform.h.

alexreg commented 6 years ago

Okay, thanks... I have no idea what the macOS APIs are like, but may have a look soon.