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