diff options
| author | fukachan <fukachan> | 2003-08-18 14:05:03 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-08-18 14:05:03 +0000 |
| commit | 41148b60d2725ae59a8435f203ea909b9cf7acfd (patch) | |
| tree | 98d8a21ecfaa8f76bf898c6726f5d9dff327bec4 /fml/lib/FML/Process | |
| parent | 8dff9d9a2d120762d6b50411007d1ba3cbbd9bb1 (diff) | |
| download | fml8-41148b60d2725ae59a8435f203ea909b9cf7acfd.tar.gz fml8-41148b60d2725ae59a8435f203ea909b9cf7acfd.tar.bz2 fml8-41148b60d2725ae59a8435f203ea909b9cf7acfd.zip | |
support --quiet options for makefml and fml.
It closes STDERR before the main routine begins.
define close_stderr_channel_if_quiet_option_specified().
Diffstat (limited to 'fml/lib/FML/Process')
| -rw-r--r-- | fml/lib/FML/Process/Configure.pm | 3 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Kernel.pm | 17 |
2 files changed, 18 insertions, 2 deletions
diff --git a/fml/lib/FML/Process/Configure.pm b/fml/lib/FML/Process/Configure.pm index a2c0bc13..149ef8ee 100644 --- a/fml/lib/FML/Process/Configure.pm +++ b/fml/lib/FML/Process/Configure.pm @@ -3,7 +3,7 @@ # Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Configure.pm,v 1.49 2003/01/11 06:58:46 fukachan Exp $ +# $FML: Configure.pm,v 1.50 2003/02/09 12:31:44 fukachan Exp $ # package FML::Process::Configure; @@ -77,6 +77,7 @@ sub prepare my $eval = $config->get_hook( 'makefml_prepare_start_hook' ); if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; } + $curproc->close_stderr_channel_if_quiet_option_specified(); $curproc->resolve_ml_specific_variables( $args ); $curproc->load_config_files( $args->{ cf_list } ); $curproc->fix_perl_include_path(); diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm index 66e560dc..7a37d4de 100644 --- a/fml/lib/FML/Process/Kernel.pm +++ b/fml/lib/FML/Process/Kernel.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Kernel.pm,v 1.170 2003/07/21 14:31:51 fukachan Exp $ +# $FML: Kernel.pm,v 1.171 2003/08/16 02:45:23 fukachan Exp $ # package FML::Process::Kernel; @@ -1092,6 +1092,21 @@ sub is_refused } +# Descriptions: close STDERR channel. +# Arguments: OBJ($curproc) +# Side Effects: close(STDERR) +# Return Value: none +sub close_stderr_channel_if_quiet_option_specified +{ + my ($curproc) = @_; + my $option = $curproc->command_line_options(); + + if (defined $option->{ quiet } || defined $option->{ q }) { + close(STDERR); + } +} + + =head1 MESSAGE HANDLING =head2 C<reply_message($msg)> |
