Return to cmds.c CVS log | Up to [local] / src / usr.bin / tip |
version 1.19, 2004/05/26 18:17:58 | version 1.20, 2004/11/07 09:48:08 | ||
---|---|---|---|
|
|
||
* Fork a program with: | * Fork a program with: | ||
* 0 <-> remote tty in | * 0 <-> remote tty in | ||
* 1 <-> remote tty out | * 1 <-> remote tty out | ||
* 2 <-> local tty out | * 2 <-> local tty stderr | ||
*/ | */ | ||
void | void | ||
consh(int c) | consh(int c) | ||
|
|
||
dup2(FD, 0); | dup2(FD, 0); | ||
dup2(3, 1); | dup2(3, 1); | ||
for (i = 3; i < 20; i++) | closefrom(3); | ||
close(i); | |||
signal(SIGINT, SIG_DFL); | signal(SIGINT, SIG_DFL); | ||
signal(SIGQUIT, SIG_DFL); | signal(SIGQUIT, SIG_DFL); | ||
execute(buf); | execute(buf); |