… | |
… | |
251 | ioctl (fd_tty, I_PUSH, "ldterm"); |
251 | ioctl (fd_tty, I_PUSH, "ldterm"); |
252 | ioctl (fd_tty, I_PUSH, "ttcompat"); |
252 | ioctl (fd_tty, I_PUSH, "ttcompat"); |
253 | } |
253 | } |
254 | #endif |
254 | #endif |
255 | |
255 | |
|
|
256 | #ifdef TIOCSCTTY |
256 | ioctl (fd_tty, TIOCSCTTY, NULL); |
257 | ioctl (fd_tty, TIOCSCTTY, NULL); |
|
|
258 | #else |
|
|
259 | fd = open (name, O_RDWR); |
|
|
260 | if (fd >= 0) |
|
|
261 | close (fd); |
|
|
262 | #endif |
257 | |
263 | |
258 | int fd = open ("/dev/tty", O_WRONLY); |
264 | int fd = open ("/dev/tty", O_WRONLY); |
259 | if (fd < 0) |
265 | if (fd < 0) |
260 | return -1; /* fatal */ |
266 | return -1; /* fatal */ |
261 | |
267 | |