Re: [JSch-users] pl. help - exec and threads.
Status: Alpha
Brought to you by:
ymnk
From: Satish A <sa...@my...> - 2005-01-26 01:18:35
|
I do call getExitStatus() after channel.isEOF returns true. On further testing, I noticed that the exit status was mostly incorrect against ssh -V = OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003 (on Fedora Core 3) and was 0 every time against ssh -V = OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090701f (on Fedora Core 2) Satish. On Tue, 2005-01-25 at 22:39 +0900, Atsuhiko Yamanaka wrote: > Hi, > > +-From: Satish A <sa...@my...> ------ > |_Date: Tue, 25 Jan 2005 03:28:18 -0800 __ > | > |I was wondering if there could be a potential issue with > |channel.getExitStatus(). > |I am noticing that the exit status when it reports a non-zero value > |does not always seem right. > |For example, > | echo "hello world" | \ > | ssh -i <priv key> user@remotehost 'cat >> /tmp/foo2>&1' > |(with or without stderr redirection) always returns 0 as exit status. > |However, done using jsch, the exit status is rarely 0 even though the > |command works every time. > > On my environment, I get '0' every time. > And, for example, for the command "cat > /", I get '1' as status code > and that means 'Operation not permitted' on GNU/Linux as you know. > So, it seems to me that it works fine at least on my environment. > > Do you really invoke 'channel.getExitStatus()' > after channel.isEOF() becomes 'true'? > > Thanks, > -- > ymnk > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > JSch-users mailing list > JSc...@li... > https://lists.sourceforge.net/lists/listinfo/jsch-users > > > _________________________________________________ > Scanned on 25 Jan 2005 20:43:00 |