From mboxrd@z Thu Jan 1 00:00:00 1970 From: zhaolei@cn.fujitsu.com (Zhaolei) Date: Fri, 17 Oct 2008 12:14:38 +0800 Subject: [ltt-dev] [PATCH v2] Remove ltt-armall/disarmall's unwanted errormessages References: <48F8065E.8080503@cn.fujitsu.com> <20081017040033.GA5067@Krystal> Message-ID: <9D7EECC5F2624736AA58083DFA169796@zhaoleiwin> Hi, Mathieu > How about : > > echo "connect $a default dynamic $CHANNEL" 2>&1 >/proc/ltt > > and then use $? as error value ? > > (try issuing "echo $?" just after the failing command) Actually, I considered about return value, but if other kind of error happened, I think it is better to show errormsg to user. If we judge on return value, user will see "Already connect" if other error happened. Judge on "write error: File exists" maybe little iffy, but on worst case, it will show whole errormessage to user(maybe the best choose). Thanks! > > Maybe we could also get rid of the "echo: write error: File exists" by > returning a more appropriate error value from the write system call ? > > Mathieu >