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.37 by root, Tue Jan 17 11:02:10 2006 UTC vs.
Revision 1.38 by root, Tue Jan 17 11:53:07 2006 UTC

225control_tty (int fd_tty) 225control_tty (int fd_tty)
226{ 226{
227 int fd; 227 int fd;
228 228
229 /* ---------------------------------------- */ 229 /* ---------------------------------------- */
230# ifdef HAVE_SETSID
231 setsid (); 230 setsid ();
232# endif
233# if defined(HAVE_SETPGID)
234 setpgid (0, 0);
235# elif defined(HAVE_SETPGRP)
236 setpgrp (0, 0);
237# endif
238
239 /* ---------------------------------------- */
240# ifdef TIOCNOTTY
241 fd = open ("/dev/tty", O_RDWR | O_NOCTTY);
242 if (fd >= 0)
243 {
244 ioctl (fd, TIOCNOTTY, NULL); /* void tty associations */
245 close (fd);
246 }
247# endif
248
249 /* ---------------------------------------- */
250 fd = open ("/dev/tty", O_RDWR | O_NOCTTY);
251 if (fd >= 0)
252 close (fd); /* ouch: still have controlling tty */
253 231
254 /* ---------------------------------------- */ 232 /* ---------------------------------------- */
255# if defined(PTYS_ARE_PTMX) && defined(I_PUSH) 233# if defined(PTYS_ARE_PTMX) && defined(I_PUSH)
256 /* 234 /*
257 * Push STREAMS modules: 235 * Push STREAMS modules:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines