60 #include <sys/ioctl.h>
62 #include <sys/ptyio.h>
76 fputs(
"\n========================\n",
logfile);
77 fputs(
"Begin New Server Session\n",
logfile);
78 fputs(
"========================\n\n",
logfile);
85 if ((forkresult = fork())) {
87 perror(
"Fork error!");
103 (void)open(
"/dev/null", O_RDONLY);
107 if ((i = open(
"/dev/tty", O_RDWR)) >= 0) {
108 #if (defined(SYSV) || defined(hpux)) && defined(TIOCTTY)
110 (void)ioctl(i, TIOCTTY, &zero);
113 # ifdef HAVE_SYS_TERMIOS_H
114 # include <sys/termios.h>
116 # ifdef HAVE_SYS_TTYCOM_H
117 # include <sys/ttycom.h>
120 (void)ioctl(i, TIOCNOTTY, (
char *)0);
129 # if defined(SYSV) || defined(SVR4)