2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-21 08:33:23 +00:00

Fix for modern python ioctl

Need to actually feed full buffer into modern python ioctl calls.
This commit is contained in:
Jarrod Johnson
2026-07-09 14:13:45 -04:00
parent 5f34fac2bc
commit beab5cd791
+2 -2
View File
@@ -469,7 +469,7 @@ def do_command(command, server):
height, width = 31, 100
if not opts.headless:
height, width = struct.unpack(
'hh', fcntl.ioctl(sys.stdout, termios.TIOCGWINSZ, b'....'))[:2]
'hh', fcntl.ioctl(sys.stdout, termios.TIOCGWINSZ, b'........')[:4])[:2]
startrequest['parameters']['width'] = width
startrequest['parameters']['height'] = height
for param in argv[2:]:
@@ -625,7 +625,7 @@ def do_resize(a, b):
if not inconsole:
return
height, width = struct.unpack(
'hh', fcntl.ioctl(sys.stdout, termios.TIOCGWINSZ, b'....'))[:2]
'hh', fcntl.ioctl(sys.stdout, termios.TIOCGWINSZ, b'........')[:4])[:2]
tlvdata.send(session.connection, {'operation': 'resize', 'width': width,
'height': height})