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

Comparing rxvt-unicode/src/init.C (file contents):
Revision 1.308 by sf-exg, Sun Dec 18 02:14:59 2011 UTC vs.
Revision 1.313 by sf-exg, Sat Jan 7 17:48:56 2012 UTC

1474 CWColormap | CWBackPixel | CWBorderPixel | CWOverrideRedirect, 1474 CWColormap | CWBackPixel | CWBorderPixel | CWOverrideRedirect,
1475 &attributes); 1475 &attributes);
1476 1476
1477 this->parent = top; 1477 this->parent = top;
1478 1478
1479 old_width = szHint.width;
1480 old_height = szHint.height;
1481
1482 set_title (rs [Rs_title]); 1479 set_title (rs [Rs_title]);
1483 set_icon_name (rs [Rs_iconName]); 1480 set_icon_name (rs [Rs_iconName]);
1484 1481
1485 classHint.res_name = (char *)rs[Rs_name]; 1482 classHint.res_name = (char *)rs[Rs_name];
1486 classHint.res_class = (char *)RESCLASS; 1483 classHint.res_class = (char *)RESCLASS;
1607 if (pty->pty >= 0) 1604 if (pty->pty >= 0)
1608 { 1605 {
1609 if (getfd_hook) 1606 if (getfd_hook)
1610 pty->pty = (*getfd_hook) (pty->pty); 1607 pty->pty = (*getfd_hook) (pty->pty);
1611 1608
1612 if (pty->pty < 0 || fcntl (pty->pty, F_SETFL, O_NONBLOCK)) 1609 if (pty->pty < 0)
1613 rxvt_fatal ("unusable pty-fd filehandle, aborting.\n"); 1610 rxvt_fatal ("unusable pty-fd filehandle, aborting.\n");
1614 } 1611 }
1615 } 1612 }
1616 else 1613 else
1617#endif 1614#endif
1618 if (!pty->get ()) 1615 if (!pty->get ())
1619 rxvt_fatal ("can't initialize pseudo-tty, aborting.\n"); 1616 rxvt_fatal ("can't initialize pseudo-tty, aborting.\n");
1617
1618 fcntl (pty->pty, F_SETFL, O_NONBLOCK);
1620 1619
1621 struct termios tio = def_tio; 1620 struct termios tio = def_tio;
1622 1621
1623#ifndef NO_BACKSPACE_KEY 1622#ifndef NO_BACKSPACE_KEY
1624 if (rs[Rs_backspace_key][0] && !rs[Rs_backspace_key][1]) 1623 if (rs[Rs_backspace_key][0] && !rs[Rs_backspace_key][1])
1674 1673
1675 _exit (EXIT_FAILURE); 1674 _exit (EXIT_FAILURE);
1676 1675
1677 default: 1676 default:
1678 if (!option (Opt_utmpInhibit)) 1677 if (!option (Opt_utmpInhibit))
1678 {
1679#ifdef LOG_ONLY_ON_LOGIN
1680 bool login_shell = option (Opt_loginShell);
1681#else
1682 bool login_shell = true;
1683#endif
1679 pty->login (cmd_pid, option (Opt_loginShell), rs[Rs_display_name]); 1684 pty->login (cmd_pid, login_shell, rs[Rs_display_name]);
1685 }
1680 1686
1681 pty->close_tty (); 1687 pty->close_tty ();
1682 1688
1683 child_ev.start (cmd_pid); 1689 child_ev.start (cmd_pid);
1684 1690
1709#elif defined (SRIOCSREDIR) 1715#elif defined (SRIOCSREDIR)
1710 int fd; 1716 int fd;
1711 1717
1712 fd = open (CONSOLE, O_WRONLY, 0); 1718 fd = open (CONSOLE, O_WRONLY, 0);
1713 if (fd >= 0) 1719 if (fd >= 0)
1714 if (ioctl (fd, SRIOCSREDIR, NULL) < 0) 1720 {
1721 ioctl (fd, SRIOCSREDIR, STDIN_FILENO);
1715 close (fd); 1722 close (fd);
1723 }
1716#endif /* SRIOCSREDIR */ 1724#endif /* SRIOCSREDIR */
1717 } 1725 }
1718 1726
1719 /* reset signals and spin off the command interpreter */ 1727 /* reset signals and spin off the command interpreter */
1720 signal (SIGINT, SIG_DFL); 1728 signal (SIGINT, SIG_DFL);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines