Message-ID: <email address hidden> Date: Sat, 21 Aug 2004 23:25:17 +0200 From: Frank Lichtenheld <email address hidden> To: <email address hidden>, <email address hidden> Cc: Ambrose Li <email address hidden> Subject: Re: Bug#263270: Patch for defoma problem in sid
> child's stout and stderr get discarded. With the patch it appears to work > as expected.
I verified the patch and uploaded a NMU with the following final patch.
diff -Naur defoma-0.11.8.bak/debian/changelog defoma-0.11.8/debian/changelog --- defoma-0.11.8.bak/debian/changelog 2004-05-25 13:54:25.000000000 +0200 +++ defoma-0.11.8/debian/changelog 2004-08-21 19:27:45.000000000 +0200 @@ -1,3 +1,11 @@ +defoma (0.11.8-0.1) unstable; urgency=high + + * NMU + * Apply patch by Jurij Smakov to fix redirecting the output + streams (Closes: #263270) + + -- Frank Lichtenheld <email address hidden> Sat, 21 Aug 2004 19:27:43 +0200 + defoma (0.11.8) unstable; urgency=low
* Fix some typos and engrish in dfontmgr.1, closes: #234329. diff -Naur defoma-0.11.8.bak/libs/libconsole.pl defoma-0.11.8/libs/libconsole.pl --- defoma-0.11.8.bak/libs/libconsole.pl 2004-01-01 19:47:02.000000000 +0100 +++ defoma-0.11.8/libs/libconsole.pl 2004-08-21 19:24:33.000000000 +0200 @@ -1,3 +1,5 @@ +use POSIX; + my $dialog = '/usr/bin/whiptail'; $dialog = '/usr/bin/dialog' unless (-x $dialog);
@@ -7,7 +9,8 @@ my $pid = fork(); if ($pid == 0) { close(PARENT_READER); - open(STDERR, ">&CHILD_WRITER"); + dup2(fileno(CHILD_WRITER),3); + open(STDOUT, ">&STDERR"); exec(@_); die("exec failure: $_[0]"); } @@ -83,7 +86,7 @@ # my $item=$output; # chomp $item; # For gdialog, which returns strings with newlines.
- my $item = safe_redirect($dialog, '--clear', '--title', + my $item = safe_redirect($dialog, '--output-fd', '3', '--clear', '--title', $title, @options, $type, $text, $height, 80, @vars);
$result = ($result >> 8);
Gruesse, -- Frank Lichtenheld <email address hidden> www: http://www.djpig.de/
Message-ID: <email address hidden>
Date: Sat, 21 Aug 2004 23:25:17 +0200
From: Frank Lichtenheld <email address hidden>
To: <email address hidden>, <email address hidden>
Cc: Ambrose Li <email address hidden>
Subject: Re: Bug#263270: Patch for defoma problem in sid
> child's stout and stderr get discarded. With the patch it appears to work
> as expected.
I verified the patch and uploaded a NMU with the following final
patch.
diff -Naur defoma- 0.11.8. bak/debian/ changelog defoma- 0.11.8/ debian/ changelog 0.11.8. bak/debian/ changelog 2004-05-25 13:54:25.000000000 +0200 0.11.8/ debian/ changelog 2004-08-21 19:27:45.000000000 +0200
--- defoma-
+++ defoma-
@@ -1,3 +1,11 @@
+defoma (0.11.8-0.1) unstable; urgency=high
+
+ * NMU
+ * Apply patch by Jurij Smakov to fix redirecting the output
+ streams (Closes: #263270)
+
+ -- Frank Lichtenheld <email address hidden> Sat, 21 Aug 2004 19:27:43 +0200
+
defoma (0.11.8) unstable; urgency=low
* Fix some typos and engrish in dfontmgr.1, closes: #234329. 0.11.8. bak/libs/ libconsole. pl defoma- 0.11.8/ libs/libconsole .pl 0.11.8. bak/libs/ libconsole. pl 2004-01-01 19:47:02.000000000 +0100 0.11.8/ libs/libconsole .pl 2004-08-21 19:24:33.000000000 +0200 whiptail' ;
diff -Naur defoma-
--- defoma-
+++ defoma-
@@ -1,3 +1,5 @@
+use POSIX;
+
my $dialog = '/usr/bin/
$dialog = '/usr/bin/dialog' unless (-x $dialog);
@@ -7,7 +9,8 @@ PARENT_ READER) ; CHILD_WRITER) ,3);
my $pid = fork();
if ($pid == 0) {
close(
- open(STDERR, ">&CHILD_WRITER");
+ dup2(fileno(
+ open(STDOUT, ">&STDERR");
exec(@_);
die("exec failure: $_[0]");
}
@@ -83,7 +86,7 @@
# my $item=$output;
# chomp $item; # For gdialog, which returns strings with newlines.
- my $item = safe_redirect( $dialog, '--clear', '--title', $dialog, '--output-fd', '3', '--clear', '--title',
+ my $item = safe_redirect(
$title, @options, $type, $text, $height, 80, @vars);
$result = ($result >> 8);
Gruesse, www.djpig. de/
--
Frank Lichtenheld <email address hidden>
www: http://