Merge lp:~clint-fewbar/ubuntu/natty/libedit/fix-tty-handling into lp:ubuntu/natty/libedit

Proposed by Clint Byrum
Status: Needs review
Proposed branch: lp:~clint-fewbar/ubuntu/natty/libedit/fix-tty-handling
Merge into: lp:ubuntu/natty/libedit
Diff against target: 63 lines (+31/-1)
4 files modified
debian/changelog (+8/-0)
debian/control (+2/-1)
debian/patches/30-change-tty-handling.patch (+20/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~clint-fewbar/ubuntu/natty/libedit/fix-tty-handling
Reviewer Review Type Date Requested Status
Marc Deslauriers Needs Fixing
Review via email: mp+47591@code.launchpad.net

Description of the change

This patch avoids setting the input TTY up when stdout is not a TTY.

To post a comment you must log in.
Revision history for this message
Marc Deslauriers (mdeslaur) :
review: Approve
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

The patch doesn't apply properly when the package builds. Could you please fix this, and compile-test it?

review: Needs Fixing
10. By Clint Byrum

fixing base level of patch

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Oops!

Tested in clean schroot sbuild after pushing rev 10, patches apply and test case still passes (php | less)

Unmerged revisions

10. By Clint Byrum

fixing base level of patch

9. By Clint Byrum

libedit/tty.c: grabs controlling terminal even when output is a non
tty, causing things like php | less to mis-function. Patch changes
this behavior to work more like readline. (LP: #322214)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-09-21 12:24:54 +0000
3+++ debian/changelog 2011-01-27 19:02:10 +0000
4@@ -1,3 +1,11 @@
5+libedit (2.11-20080614-2ubuntu1) natty; urgency=low
6+
7+ * libedit/tty.c: grabs controlling terminal even when output is a non
8+ tty, causing things like php | less to mis-function. Patch changes
9+ this behavior to work more like readline. (LP: #322214)
10+
11+ -- Clint Byrum <clint@ubuntu.com> Wed, 26 Jan 2011 13:04:09 -0800
12+
13 libedit (2.11-20080614-2) unstable; urgency=high
14
15 * libedit2.shlibs: Fix minimal dependency version
16
17=== modified file 'debian/control'
18--- debian/control 2009-06-22 11:55:49 +0000
19+++ debian/control 2011-01-27 19:02:10 +0000
20@@ -1,7 +1,8 @@
21 Source: libedit
22 Section: libs
23 Priority: standard
24-Maintainer: Anibal Monsalve Salazar <anibal@debian.org>
25+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
26+XSBC-Original-Maintainer: Anibal Monsalve Salazar <anibal@debian.org>
27 Build-Depends: debhelper (>= 7), quilt, pmake (>= 1.45-8), groff-base,
28 libbsd-dev (>= 0.1.3), libncurses5-dev, bsdmainutils
29 Standards-Version: 3.8.2
30
31=== added file 'debian/patches/30-change-tty-handling.patch'
32--- debian/patches/30-change-tty-handling.patch 1970-01-01 00:00:00 +0000
33+++ debian/patches/30-change-tty-handling.patch 2011-01-27 19:02:10 +0000
34@@ -0,0 +1,20 @@
35+From: Clint Byrum <clint@ubuntu.com>
36+Subject: Do not setup the terminal if output is not a tty
37+Bug: https://sourceforge.net/tracker/index.php?func=detail&aid=3044367&group_id=18314&atid=118314
38+Bug-Ubuntu: https://launchpad.net/bugs/322214
39+Forwarded: yes, message sent to tech-userlevel@netbsd.org
40+
41+=== modified file 'libedit/tty.c'
42+--- a/libedit/tty.c 2008-06-14 17:13:08 +0000
43++++ b/libedit/tty.c 2011-01-26 21:03:59 +0000
44+@@ -472,6 +472,9 @@
45+ if (el->el_flags & EDIT_DISABLED)
46+ return (0);
47+
48++ if (!isatty(fileno(el->el_outfile)))
49++ return (-1);
50++
51+ if (tty_getty(el, &el->el_tty.t_ed) == -1) {
52+ #ifdef DEBUG_TTY
53+ (void) fprintf(el->el_errfile,
54+
55
56=== modified file 'debian/patches/series'
57--- debian/patches/series 2009-06-22 11:55:49 +0000
58+++ debian/patches/series 2011-01-27 19:02:10 +0000
59@@ -6,3 +6,4 @@
60 10-define_SIZE_T_MAX.diff
61 12-libedit-Makefile.diff
62 20-fortify.patch
63+30-change-tty-handling.patch

Subscribers

People subscribed via source and target branches

to all changes: