You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changing the ctty is a cause to many complications and potential bugs in the code. For example:
Have to add special cases to allow client to force exit
Potential bugs while debugging a process with children (sighup delivered to children)
Changing ctty requires changing sid and pgid, or pid, which can interfere with some programs
Using setsid can cause zombie processes
There is apparently no easy way to restore the original ctty
The only (?) advantage of changing the ctty is to allow the tty driver to deliver signals to the process according to keys sent by the client. We could just emulate this behavior ourselves and save all the trouble of changing the actual ctty.
The text was updated successfully, but these errors were encountered:
I was going to open an bug, but then I saw this existing one (that at least seems to line up with the issue I encountered).
Python: 3.10.5
madbg: 1.2.0
I have an application running in uwsgi on another machine like so:
I added a breakpint like: madbg.set_trace(ip='my-ip', port=3513) and when I tried to connect to it from my PC with $ madbg connect my-ip 3513 it caused the application to crash. This is the end of the stack trace:
.../madbg/tty_utils.py", line 53, in attach_ctty
fcntl.ioctl(fd, termios.TIOCSCTTY, 1)
PermissionError: [Errno 1] Operation not permitted
From ioctl_tty(2) I tried changing the third argument to 1 from 0, but it made no difference. I changed the line to just pass and was able to connect without an issue.
Thank you! I am working on a new major version for madbg, and getting rid of this behavior will be one of the main updates in it. Until then, I fixed your specific issue and published a new minor version - try madbg==1.3.1 and see if it solved your case 😄
Changing the ctty is a cause to many complications and potential bugs in the code. For example:
The only (?) advantage of changing the ctty is to allow the tty driver to deliver signals to the process according to keys sent by the client. We could just emulate this behavior ourselves and save all the trouble of changing the actual ctty.
The text was updated successfully, but these errors were encountered: