Inappropriate ioctl using Ubuntu and pty
ruapotato opened this issue · 3 comments
ruapotato commented
I'm working on a terminal multiplexer written in python. On Ubuntu based distros, I'm seeing the error:
bash: cannot set terminal process group (9862): Inappropriate ioctl for device
bash: no job control in this shell
tmp@tmp-VirtualBox:
On openSuSE and Fedora, I don't see the ioctl error and job contol works fine.
Example issue:
#!/usr/bin/python3
import subprocess
import sys
import pty
import os
master, slave = pty.openpty()
bashCMD = "bash".split()
p = subprocess.Popen(bashCMD, preexec_fn=os.setsid, stdin=slave, stdout=slave, stderr=slave, universal_newlines=True, shell=True)
while p.poll() is None:
data = os.read(master, 1026)
print(str(data))
Full project: https://bitbucket.org/hackersgame/janit/src/master/
adrianbn commented
Hi @ruapotato, I think you got the wrong project. It seems like you're looking for pty, not pyt.
adrianbn commented
No worries! Good luck!
…On Thu, Mar 28, 2019 at 10:59 AM ruapotato ***@***.***> wrote:
Hello @adrianbn <https://github.com/adrianbn>, I think your right...
Sorry for the dyslexic post.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#201 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADzXxTeu2gvpdSx6kaHtfr-Idr5RCQ8tks5vbQGXgaJpZM4cQEOJ>
.