Date: Sat, 27 Feb 2016 17:01:01 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 205191] mail/dcc-dccd: Fails stage-qa Message-ID: <bug-205191-13-INtBMtIalu@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-205191-13@https.bugs.freebsd.org/bugzilla/> References: <bug-205191-13@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D205191 --- Comment #10 from John Hein <z7dr6ut7gs@snkmail.com> --- I tracked it down. This program reproduces it: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D % cat foo.c #include <stdio.h> #include <histedit.h> static EditLine *el_e =3D 0; int main(int argc, char **argv) { printf("start\n"); el_e =3D el_init("foo", stdin, stdout, stderr); if (el_e) el_end(el_e); else printf("el_init failed\n"); printf("end\n"); printf("end\n"); return 0; } =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D cc foo.c /usr/local/lib/libedit.so -o foo && ./foo | cat 'stty -a' shows the baud rate at 50. If you look in the devel/libedit code, it looks like there's a case where c= ode in el_end() tries to restore the original tty settings. But if the output = is not a tty, the original tty settings were never saved. So it restores inva= lid termios settings. It's possible cdcc should check for isatty() on the output file descriptor = and not used libedit (it currently checks for the input file descriptor). But libedit should not try to use termios settings for a structure that was nev= er correctly populated. So that's definitely a bug in libedit. The [older] base version of libedit in freebsd just doesn't have the check = for isatty() in tty_setup, so it doesn't short circuit the initialization code = that populates the original termios settings structure. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-205191-13-INtBMtIalu>