ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/ptytty.C
(Generate patch)

Comparing rxvt-unicode/src/ptytty.C (file contents):
Revision 1.46 by root, Thu Jan 19 09:57:20 2006 UTC vs.
Revision 1.47 by root, Thu Jan 19 10:27:27 2006 UTC

276static int 276static int
277control_tty (int fd_tty) 277control_tty (int fd_tty)
278{ 278{
279 setsid (); 279 setsid ();
280 280
281# if defined(PTYS_ARE_PTMX) && defined(I_PUSH) 281#if defined(PTYS_ARE_PTMX) && defined(I_PUSH)
282 /* 282 /*
283 * Push STREAMS modules: 283 * Push STREAMS modules:
284 * ptem: pseudo-terminal hardware emulation module. 284 * ptem: pseudo-terminal hardware emulation module.
285 * ldterm: standard terminal line discipline. 285 * ldterm: standard terminal line discipline.
286 * ttcompat: V7, 4BSD and XENIX STREAMS compatibility module. 286 * ttcompat: V7, 4BSD and XENIX STREAMS compatibility module.
294 * documentation is really unclear about whether it is any close () on 294 * documentation is really unclear about whether it is any close () on
295 * the master side or the last close () - i.e. a proper STREAMS dismantling 295 * the master side or the last close () - i.e. a proper STREAMS dismantling
296 * close () - on the master side which causes a hang up to be sent 296 * close () - on the master side which causes a hang up to be sent
297 * through - Geoff Wing 297 * through - Geoff Wing
298 */ 298 */
299# ifdef HAVE_ISASTREAM 299# ifdef HAVE_ISASTREAM
300 if (isastream (fd_tty) == 1) 300 if (isastream (fd_tty) == 1)
301# endif 301# endif
302 { 302 {
303 ioctl (fd_tty, I_PUSH, "ptem"); 303 ioctl (fd_tty, I_PUSH, "ptem");
304 ioctl (fd_tty, I_PUSH, "ldterm"); 304 ioctl (fd_tty, I_PUSH, "ldterm");
305 ioctl (fd_tty, I_PUSH, "ttcompat"); 305 ioctl (fd_tty, I_PUSH, "ttcompat");
306 } 306 }
307# endif 307#endif
308 308
309 ioctl (fd_tty, TIOCSCTTY, NULL); 309 ioctl (fd_tty, TIOCSCTTY, NULL);
310 310
311 int fd = open ("/dev/tty", O_WRONLY); 311 int fd = open ("/dev/tty", O_WRONLY);
312 if (fd < 0) 312 if (fd < 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines