This is the mail archive of the frysk-bugzilla@sourceware.org mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug general/3928] Pty.cxx frysk::sys::Pty::setUpPtyForConsole uses system() calls to set tty properties


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]