Is shutil.get_terminal_size useless?

Marko Rauhamaa marko at pacujo.net
Sat Jan 28 14:30:42 EST 2017


Chris Angelico <rosuav at gmail.com>:
> Background processes don't have terminal access. Whether it's a daemon
> or something started as "commandname >/dev/null 2>/dev/null </dev/null
> &" from bash, it doesn't have access to a terminal.

A nitpick: a process running in the background or a process with no open
terminal file descriptor still does have a controlling terminal under
Unix/Linux.

<URL: http://man7.org/linux/man-pages/man4/tty.4.html>
<URL: https://docs.python.org/3/library/fcntl.html#fcntl.ioctl>
<URL: https://linux.die.net/man/2/setsid>
<URL: https://docs.python.org/3/library/os.html#os.setsid>


Marko


More information about the Python-list mailing list