Re: waitFor and return (very strange)
From: Gordon Beaton (not_at_for.email)
Date: 05/17/04
- Next message: Andrew Thompson: "Re: simulate a html form submission"
- Previous message: Larry Barowski: "Re: Unacknowledged Java bugs"
- In reply to: depo: "Re: waitFor and return (very strange)"
- Next in thread: depo: "Re: waitFor and return (very strange)"
- Reply: depo: "Re: waitFor and return (very strange)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 17 May 2004 10:01:24 +0200
On 17 May 2004 00:39:34 -0700, depo wrote:
> I don't find difference in env variables (printed by set command) when
> rsh started by command line or java.Must i set an hide variable?
I was not referring to environment *variables*. The runtime
environment itself is slightly different when you run from an
interactive or non-interactive shell, because the situations are
treated differently by the remote shell.
> But when rsh is started by command line i see 3 lines (and all is ok
> rsh doesn't return if remote gui is running)
>
> access control disabled from any host
> ttytype=couldn't open /dev/tty for reading
> stty : Unknown error
>
> In java code input stream proc.getInputStream() and
> proc.getErrorStream() print nothing and rsh returns after few
> minutes
These messages appear to come from the shell initialization on the
remote host (.bashrc, .bash_profile, .tcshrc or similar). If you don't
see these lines when you use rsh from java, it means that there is a
difference in the way the remote login shell handles the
non-interactive case. There may also be some conditional expressions
in the login scripts on the remote host.
These are all Unix issues that have nothing to do with Java. Read the
man pages for the remote shell, paying particular attention to
concepts like login, non-login, interactive and non-interactive
shells. Ask further questions in an appropriate unix shell newsgroup.
> Using as Dario said
> rsh 172.16.241.97 -n -l bmsadmin
> "/opt/bms/STLS/unixcommands/srv_start..."
> provokes command line returns as in java case
Did you try my first suggestion, to leave the OutputStream open?
/gordon
-- [ do not email me copies of your followups ] g o r d o n + n e w s @ b a l d e r 1 3 . s e
- Next message: Andrew Thompson: "Re: simulate a html form submission"
- Previous message: Larry Barowski: "Re: Unacknowledged Java bugs"
- In reply to: depo: "Re: waitFor and return (very strange)"
- Next in thread: depo: "Re: waitFor and return (very strange)"
- Reply: depo: "Re: waitFor and return (very strange)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|