stdout/stderr when they are not a tty.
{
foreground = tcgetpgrp(script_fds[SFD_USERTTY]) == ppgrp;
if (foreground && !tty_initialized) {
- if (term_copy(script_fds[SFD_USERTTY], script_fds[SFD_SLAVE], ttyout)) {
+ if (term_copy(script_fds[SFD_USERTTY], script_fds[SFD_SLAVE])) {
tty_initialized = 1;
sync_ttysize(script_fds[SFD_USERTTY], script_fds[SFD_SLAVE]);
}
if (foreground) {
/* Copy terminal attrs from user tty -> pty slave. */
- if (term_copy(script_fds[SFD_USERTTY], script_fds[SFD_SLAVE], ttyout)) {
+ if (term_copy(script_fds[SFD_USERTTY], script_fds[SFD_SLAVE])) {
tty_initialized = 1;
sync_ttysize(script_fds[SFD_USERTTY], script_fds[SFD_SLAVE]);
}
/* term.c */
int term_cbreak(int);
-int term_copy(int, int, int);
+int term_copy(int, int);
int term_noecho(int);
int term_raw(int, int, int);
int term_restore(int, int);
}
int
-term_copy(int src, int dst, int opost)
+term_copy(int src, int dst)
{
struct termios tt;
if (tcgetattr(src, &tt) != 0)
return(0);
- /* Do not do post-processing unless opost set. */
- if (!opost)
- CLR(tt.c_oflag, OPOST);
/* XXX - add TCSANOW compat define */
if (tcsetattr(dst, TCSANOW|TCSASOFT, &tt) != 0)
return(0);