Re: Xterm/Login hangs after starting remote service
From: Laurenz Albe (albe_at_culturallNOSPAM.com)
Date: 01/13/05
- Next message: Alexander Harsch: "Gentoo and wlan options"
- Previous message: Laurenz Albe: "Re: Kernel boot failing"
- In reply to: fritz-bayer_at_web.de: "Xterm/Login hangs after starting remote service"
- Next in thread: fritz-bayer_at_web.de: "Re: Xterm/Login hangs after starting remote service"
- Reply: fritz-bayer_at_web.de: "Re: Xterm/Login hangs after starting remote service"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 13 Jan 2005 09:28:36 +0000 (UTC)
fritz-bayer@web.de wrote:
> I`m loggin into a remote site via ssh from an existing login shell.
> Then I start a program using a start script.
>
> The script contains the following start line to run the program:
>
> nohup /opt/java/bin/java -jar httpd.jar localhost:80 2>&1 >>
> standard_input_output.log &
> This works - the program starts up. However, when I logout my xterm
> window hangs and I do not get back to the login shell from before.
What you do is the following (in symbolic notation):
stderr = stdout;
stdout = fopen("standard_input_output.log", "a");
After these two operations stderr still points to the original stdout,
so your stderr writes to the terminal, resulting in the observed behaviour.
The solution is to reverse the redirections:
nohup /opt/java/bin/java -jar httpd.jar localhost:80 \
>>standard_input_output.log 2>&1 &
Yours,
Laurenz Albe
- Next message: Alexander Harsch: "Gentoo and wlan options"
- Previous message: Laurenz Albe: "Re: Kernel boot failing"
- In reply to: fritz-bayer_at_web.de: "Xterm/Login hangs after starting remote service"
- Next in thread: fritz-bayer_at_web.de: "Re: Xterm/Login hangs after starting remote service"
- Reply: fritz-bayer_at_web.de: "Re: Xterm/Login hangs after starting remote service"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|