/[smeserver]/rpms/e-smith-lib/sme7/e-smith-lib-1.18.0-dialogstderr.patch
ViewVC logotype

Contents of /rpms/e-smith-lib/sme7/e-smith-lib-1.18.0-dialogstderr.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Tue Oct 7 18:41:09 2008 UTC (16 years, 1 month ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
New streams

1 diff -Nur -x '*.orig' -x '*.rej' e-smith-lib-1.18.0/root/usr/lib/perl5/site_perl/esmith/console.pm mezzanine_patched_e-smith-lib-1.18.0/root/usr/lib/perl5/site_perl/esmith/console.pm
2 --- e-smith-lib-1.18.0/root/usr/lib/perl5/site_perl/esmith/console.pm 2008-08-09 10:14:41.000000000 -0600
3 +++ mezzanine_patched_e-smith-lib-1.18.0/root/usr/lib/perl5/site_perl/esmith/console.pm 2008-08-09 10:14:17.000000000 -0600
4 @@ -124,7 +124,7 @@
5
6 sub whiptail
7 {
8 - _screen(shift, "/sbin/e-smith/whiptail", @_);
9 + _screen(shift, "/usr/bin/whiptail", @_);
10 }
11
12 sub _screen
13 @@ -155,24 +155,32 @@
14 # Child
15 #----------------------------------------
16
17 - # whiptail sends its output via STDERR. We temporarily
18 - # shut off warnings so they don't interfere with that.
19 - local $^W = 0;
20 -
21 # Attach child's STDIN to the reading end of the pipe
22 -
23 close READER
24 or die gettext("Couldn't close reading end of pipe") , ": $!\n";
25
26 - open STDERR, ">& WRITER"
27 - or die gettext("Couldn't connect STDERR to pipe"), ": $!\n";
28 -
29 - close WRITER
30 - or die gettext("Couldn't close writing end of pipe"), ": $!\n";
31 -
32 -
33 - unshift @whiptailArgs, $whiptail,
34 - '--backtitle', $self->backtitle;
35 + if ($whiptail =~ m{\bwhiptail$} ) {
36 + # whiptail sends its output via STDERR. We temporarily
37 + # shut off warnings so they don't interfere with that.
38 + local $^W = 0;
39 +
40 + open STDERR, ">& WRITER"
41 + or die gettext("Couldn't connect STDERR to pipe"), ": $!\n";
42 +
43 + close WRITER
44 + or die gettext("Couldn't close writing end of pipe"), ": $!\n";
45 +
46 + unshift @whiptailArgs, $whiptail,
47 + '--backtitle', $self->backtitle;
48 + } else {
49 + use Fcntl qw/F_SETFD/;
50 +
51 + # Clear close-on-exec on WRITER so that it stays open for dialog to use
52 + fcntl(WRITER, F_SETFD, 0);
53 +
54 + unshift @whiptailArgs, $whiptail,
55 + '--backtitle', $self->backtitle, "--output-fd", fileno(WRITER);
56 + }
57 exec @whiptailArgs;
58 die gettext("Couldn't exec:"), ": $!\n";
59 }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed