The output of command systemctl status dnsmasq with pexpect.spawn gets truncated.
pexpect.spawn('systemctl status dnsmasq', encoding='utf-8')
i = child.expect([".*\$ ", pexpect.EOF, pexpect.TIMEOUT])
if i == 1:
child.sendcontrol("c")
print(child.before)
I tested this for sshd.service and result is same. However for other commands like sudo apt update and sudo apt upgrade, pexpect logs full output. What's causing this behavior and how to correct it?
