Mailinglist Archive: yast-devel (105 mails)

< Previous Next >
[yast-devel] [PATCH]Save and restore Stderr
  • From: Wenji Huang <wenji.huang@xxxxxxxxxx>
  • Date: Tue, 16 Sep 2008 14:51:27 +0800
  • Message-id: <48CF576F.3020406@xxxxxxxxxx>

We had ported yast to RHEL4/OEL4 those could make widen users to
experience the integrated administration tool. And Oracle Enterprise
Manager could remotely operate on hosts through yast EM interface that
will covert complex instructions to yast command line. The result of
command will be transfered back to Oracle EM to give corresponding response.

There is one important module in yast EM interface written by Bert
Barbe. Some yast modules will re-directed Stderr to other place so that
there is no information/results outputted after yast command is
executed. can save/restore Stderr to avoid this.

A simple example for reference:

import "SaveStderr";
import "xxx" //the module will re-directed Stderr to other

Beside Oracle EM, it may be helpful to debug yast in command. We hope it can be merged into upstream yast so as not to keep separated one
when porting yast to later RHEL.


#!/usr/bin/perl -w
package SaveStderr ;

open OLDERR, ">&STDERR";

use strict;

import YaPI;

# return state of $use_gui
BEGIN { $TYPEINFO{RestoreStderr} = ["function", "void"];}
sub RestoreStderr {
open STDERR, ">&OLDERR" ;

< Previous Next >
This Thread
  • No further messages