~ubuntu-branches/ubuntu/trusty/expect/trusty

« back to all changes in this revision

Viewing changes to debian/patches/12-fdout.patch

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-08-03 12:00:29 UTC
  • Revision ID: james.westby@ubuntu.com-20090803120029-mdxnz1e7vyu06ji6
* Adding patch from Adam Tkac <atkac@redhat.com> to compile with
  tcl8.5, but not yet enabling it.
* Updating vcs fields in control file.
* Using patch-stamp rather than patch in rules file.
* Replacing obsolete dh_clean -k with dh_prep.
* Using correct rfc-2822 date formats in changelog.
* Updating package to standards version 3.8.2.
* Adding misc depends.
* Removing shlibs file.
* Using quilt rather than dpatch.
* Adding patch from fedora to fix header comments.
* Adding patch from fedora to fix permissions when accessing logfiles.
* Adding patch from Vitezslav Crhonek <vcrhonek@redhat.com> for tcl
  8.5.6, but not yet enabling it.
* Minimizing rules file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Author: Ian Jackson <iwj@ubuntu.com>
 
2
Description: expBusy forgets to open fdout (Closes: #440818).
 
3
 
 
4
diff -Naurp expect.orig/exp_command.c expect/exp_command.c
 
5
--- expect.orig/exp_command.c   2009-08-03 06:58:30.000000000 +0000
 
6
+++ expect/exp_command.c        2009-08-03 08:37:47.000000000 +0000
 
7
@@ -310,7 +310,15 @@ expBusy(esPtr)
 
8
     fcntl(x,F_DUPFD,esPtr->fdin);
 
9
     close(x);
 
10
   }
 
11
-  expCloseOnExec(esPtr->fdin);
 
12
+  if (esPtr->fdout != EXP_NOFD &&
 
13
+      esPtr->fdout != esPtr->fdin) {
 
14
+    fcntl(esPtr->fdin,F_DUPFD,esPtr->fdout);
 
15
+  }
 
16
+  if (esPtr->fdin > 2)
 
17
+    expCloseOnExec(esPtr->fdin);
 
18
+  if (esPtr->fdout != EXP_NOFD &&
 
19
+      esPtr->fdout > 2)
 
20
+    expCloseOnExec(esPtr->fdout);
 
21
   esPtr->fdBusy = TRUE;
 
22
 }
 
23