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
=== modified file 'debian/changelog'
--- debian/changelog 2010-09-21 12:24:54 +0000
+++ debian/changelog 2011-01-27 19:02:10 +0000
@@ -1,3 +1,11 @@
1libedit (2.11-20080614-2ubuntu1) natty; urgency=low
2
3 * libedit/tty.c: grabs controlling terminal even when output is a non
4 tty, causing things like php | less to mis-function. Patch changes
5 this behavior to work more like readline. (LP: #322214)
6
7 -- Clint Byrum <clint@ubuntu.com> Wed, 26 Jan 2011 13:04:09 -0800
8
1libedit (2.11-20080614-2) unstable; urgency=high9libedit (2.11-20080614-2) unstable; urgency=high
210
3 * libedit2.shlibs: Fix minimal dependency version 11 * libedit2.shlibs: Fix minimal dependency version
412
=== modified file 'debian/control'
--- debian/control 2009-06-22 11:55:49 +0000
+++ debian/control 2011-01-27 19:02:10 +0000
@@ -1,7 +1,8 @@
1Source: libedit1Source: libedit
2Section: libs2Section: libs
3Priority: standard3Priority: standard
4Maintainer: Anibal Monsalve Salazar <anibal@debian.org>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Anibal Monsalve Salazar <anibal@debian.org>
5Build-Depends: debhelper (>= 7), quilt, pmake (>= 1.45-8), groff-base,6Build-Depends: debhelper (>= 7), quilt, pmake (>= 1.45-8), groff-base,
6 libbsd-dev (>= 0.1.3), libncurses5-dev, bsdmainutils7 libbsd-dev (>= 0.1.3), libncurses5-dev, bsdmainutils
7Standards-Version: 3.8.28Standards-Version: 3.8.2
89
=== added file 'debian/patches/30-change-tty-handling.patch'
--- debian/patches/30-change-tty-handling.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/30-change-tty-handling.patch 2011-01-27 19:02:10 +0000
@@ -0,0 +1,20 @@
1From: Clint Byrum <clint@ubuntu.com>
2Subject: Do not setup the terminal if output is not a tty
3Bug: https://sourceforge.net/tracker/index.php?func=detail&aid=3044367&group_id=18314&atid=118314
4Bug-Ubuntu: https://launchpad.net/bugs/322214
5Forwarded: yes, message sent to tech-userlevel@netbsd.org
6
7=== modified file 'libedit/tty.c'
8--- a/libedit/tty.c 2008-06-14 17:13:08 +0000
9+++ b/libedit/tty.c 2011-01-26 21:03:59 +0000
10@@ -472,6 +472,9 @@
11 if (el->el_flags & EDIT_DISABLED)
12 return (0);
13
14+ if (!isatty(fileno(el->el_outfile)))
15+ return (-1);
16+
17 if (tty_getty(el, &el->el_tty.t_ed) == -1) {
18 #ifdef DEBUG_TTY
19 (void) fprintf(el->el_errfile,
20
021
=== modified file 'debian/patches/series'
--- debian/patches/series 2009-06-22 11:55:49 +0000
+++ debian/patches/series 2011-01-27 19:02:10 +0000
@@ -6,3 +6,4 @@
610-define_SIZE_T_MAX.diff610-define_SIZE_T_MAX.diff
712-libedit-Makefile.diff712-libedit-Makefile.diff
820-fortify.patch820-fortify.patch
930-change-tty-handling.patch

Subscribers

People subscribed via source and target branches

to all changes: