.TH SETDEV 2 .SH NAME setdev \- set the standard input and output device ids for a process .SH SYNOPSIS .nf .B int setdev(pid, dev1, dev2) .B int pid; .B int dev1; .B int dev2; .fi .SH DESCRIPTION .I Setdev records the device ids \f2dev1\f1 and \f2dev2\f1 in the process table entry for process \f2pid\f1 so the system will automatically close the devices when the process exits. It is used primarily by the shell to record the process' standard input and standard output device ids. .SH SEE ALSO close(2), kill(2) .SH BUGS The limit of two device ids per process is fixed, and both must be set in a single call.