mirror of
git://soft.sys114.com/klipper
synced 2026-02-09 14:14:23 +09: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