mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-10-26 07:46:11 +01:00
util: Change the /tmp/printer pty to be group readable
For some reason, Linux creates the pseudo tty with group writable permissions, but not group readable. Use chmod to allow the device to also be group readable. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -29,7 +29,9 @@ def create_pty(ptyname):
|
||||
os.unlink(ptyname)
|
||||
except os.error:
|
||||
pass
|
||||
os.symlink(os.ttyname(sfd), ptyname)
|
||||
filename = os.ttyname(sfd)
|
||||
os.chmod(filename, 0660)
|
||||
os.symlink(filename, ptyname)
|
||||
set_nonblock(mfd)
|
||||
old = termios.tcgetattr(mfd)
|
||||
old[3] = old[3] & ~termios.ECHO
|
||||
|
||||
Reference in New Issue
Block a user