From: An Nguyen <an@(email surpressed).au>
Subject: Re: rush error messages
   Date: Mon, 21 Apr 2008 00:03:58 -0400
Msg# 1725
View Complete Thread (6 articles) | All Threads
Last Next
Hi Greg,
I think i've found out what my issue is.

I'm actually piping the rush output to 'grep' and
redirecting the stderr and stderr of grep instead of
the rush command. e.g.

rush -laj | grep Done 2>/dev/null

Hence rush's stderr messages were echoing
to the terminal.

Sorry about that, i knew it was something really really silly.
Its just that host errors doesn't appear 100% of the time
and I thought to myself, yay it worked etc.

Thanks again for your help.



Greg Ercolano wrote:
[posted to rush.general]

An Nguyen wrote:
I've been trying redirect 2>/dev/null but the message still gets echoed into the terminal.
[..]
i've tried cmd  1>blah 2>bob to redirect them into files,
but i still get that message outputted onto the terminal.

	Looking back at your first message, 1>blah 2>bob definitely
	should be catching that "No route to host" message.

So you're saying the 'No route to host' is still getting through
	even if you invoke your ./stats.pl command as:

./stats.pl 2>err.log 1>out.log

	..and for sure that's a bourne compatible shell you're
	invoking that from? (csh/tcsh syntax is different)

	That really should work.. no message should be appearing on
	the tty.

	What perl command is being used to run 'rush -laj' (system(), open("|"), etc)
	 and are there any special shell redirection characters as
	part of that command? Is the $ENV{SHELL} set to something other
	than a bourne shell? (Try setting $ENV{SHELL}="/bin/sh"; explicitly)

	Rush doesn't try writing anything to the tty directly,
	so if you're getting problems with messages leaking past
	>1 and 2>, I'm not sure why, and would have to work with you
	interactively to figure that one out.






--

An D Nguyen

Systems Programmer / Perl Poet
Research & Development
FUEL International Pty Ltd
65 King Street, Newtown, Sydney NSW, 2042
Australia


Last Next