This is the mail archive of the
frysk-bugzilla@sourceware.org
mailing list for the frysk project.
[Bug general/3928] Pty.cxx frysk::sys::Pty::setUpPtyForConsole uses system() calls to set tty properties
- From: "cmoller at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: frysk-bugzilla at sourceware dot org
- Date: 26 Jan 2007 19:42:35 -0000
- Subject: [Bug general/3928] Pty.cxx frysk::sys::Pty::setUpPtyForConsole uses system() calls to set tty properties
- References: <20070126190257.3928.pmuldoon@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From cmoller at redhat dot com 2007-01-26 19:42 -------
What the system() stuff below is doing is setting the way the tty works. It
could be done w/o system() by using terminal control ops similar to the following:
{
struct termios tio;
if (0 > tcgetattr(fd, *tio)) return -1;
tio.c_lflag |= ICANON | ECHO;
tio.c_cc[VMIN] = 1;
if (0 < tcsetattr(fd, TCSANOW, ,&tio)) return -1;
return 0;
}
where fd is the file descriptor associated with pts_name.
There are a few other wrinkles that might be relevant, but they'd depend on what
else is going on.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3928
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.