chiark / gitweb /
1324d3a90bb479fc6c417832cd5e91eee710f454
[bin.git] / tiocnotty
1 #! /usr/bin/python
2
3 import fcntl
4 import os
5 import sys
6 import termios
7
8 try:
9     with open('/dev/tty') as tty:
10         fcntl.ioctl(tty, termios.TIOCNOTTY)
11 except IOError:
12     pass
13
14 os.execvp(sys.argv[1], sys.argv[1:])