-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weirdness hooking calls to open()
in terminal apps
#41
Comments
I just tried your testcase on macOS 12.6.3 and 13.2, with HookCase 7.1.1 (the current version), and had no problems. Remember that you need to codesign |
hook.dylib is codesigned, the Terminal process self not quit, but i can't input any commmand, here is log
|
Now I see your problem. It seems that every time you click on the second Terminal window (the one you just spawned), the whole Terminal app restarts and the (second) window disappears. I haven't found out why this happens, but I do have a workaround. Add
I don't understand why this works. It's entirely possible that your problem isn't a bug in HookCase. But I'll leave this issue open until I know more. It will probably stay open for quite a long time. Possible causes that I've already ruled out:
One more thing: The problem goes away if the hook library doesn't do any logging from its |
open()
in Apple's Terminal app
This problem may be specific to And, interestingly, it also happens with Alacritty. |
open()
in Apple's Terminal appopen()
in terminal apps
it might have had something to do with LogWithFormat, when VIRTUAL_SERIAL_PORT is not defined and LogWithFormat to stdout, it will cause xpc Connection interrupted, it looked like that
meanwhile when VIRTUAL_SERIAL_PORT is defined and LogWithFormat to PySerialPortLogger opened tty, xpc Connection interrupted will not occur |
Thanks for this information. I'll keep it in mind. |
hook lib
command
The text was updated successfully, but these errors were encountered: