9 fprintf(stderr, "usage: notty PROGRAM [-r] [ARGS...]\n");
12 int main(int argc, char **argv)
18 while((c = getopt(argc, argv, "r")) >= 0) {
30 if(argc - optind < 1) {
34 if((tty = open("/dev/tty", O_RDWR)) < 0) {
38 if(ioctl(tty, TIOCNOTTY)) {
50 execvp(argv[optind], argv + optind);