FSHDIAG
(void) fcntl(SHDIAG = dcopy(2, FSHDIAG), F_SETFD, 1);
if (isatty(FSHDIAG))
f = FSHDIAG;
SHDIAG = dcopy(2, FSHDIAG);