present for Jim

This commit is contained in:
albert
2002-12-03 09:07:59 +00:00
parent 538f249009
commit 7ac9a0e1f5
8 changed files with 100 additions and 38 deletions

View File

@ -144,15 +144,15 @@ static const char *parse_tty(char *str, sel_union *ret){
lookup("/dev/pty%s");
lookup("/dev/%snsole"); /* "co" means "console", maybe do all VCs too? */
if(!strcmp(str,"-")){ /* "-" means no tty (from AIX) */
ret->tty = -1; /* processes w/o tty */
ret->tty = 0; /* processes w/o tty */
return 0;
}
if(!strcmp(str,"?")){ /* "?" means no tty, which bash eats (Reno BSD?) */
ret->tty = -1; /* processes w/o tty */
ret->tty = 0; /* processes w/o tty */
return 0;
}
if(!*(str+1) && (stat(str,&sbuf)>=0)){ /* Kludge! Assume bash ate '?'. */
ret->tty = -1; /* processes w/o tty */
ret->tty = 0; /* processes w/o tty */
return 0;
}
#undef lookup