From: Colin Watson Date: Mon, 24 Nov 2008 19:43:17 +0000 (+0000) Subject: add TIOCNOTTY ioctl wrapper X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=daa61cc1db4ce5df90a0cfc18d22005d02d9f8c8;p=bin.git add TIOCNOTTY ioctl wrapper --- diff --git a/tiocnotty b/tiocnotty new file mode 100755 index 0000000..1bf635e --- /dev/null +++ b/tiocnotty @@ -0,0 +1,15 @@ +#! /usr/bin/python + +import sys +import os +import fcntl +import termios + +try: + tty = open('/dev/tty') + fcntl.ioctl(tty, termios.TIOCNOTTY) + tty.close() +except IOError: + pass + +os.execvp(sys.argv[1], sys.argv[1:])