Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: Question on SSH hang on exit when running Java background process |
|---|---|
| Date: | Mon, 30 Apr 2007 08:24:50 -0400 |
On Fri, Apr 27, 2007 at 10:25:44PM +0800, YU Jiazi wrote:
My problem is that my SSH client hang on "exit" if I run a java program as a background process.
This will hang: ssh somewhere 'sleep 1000 &' This will not hang: ssh somewhere 'sleep 1000 >/dev/null 2>&1 &' Make sure your program does NOT leave open file descriptors attached to the terminal, and you should be fine.
then I save it as Test.java, and compile, run it as follow in a terminal connected by ssh(my ssh client is putty 0.58): javac Test.java java -cp . Test & exit then putty hang, it seems that the SSH connection is still alive and waiting for the java program to exit.
Do this instead: java -cp . Test >/dev/null 2>&1 &
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Question on SSH hang on exit when running Java background process, Darren Tucker |
|---|---|
| Previous by Thread: | Re: Question on SSH hang on exit when running Java background process, Darren Tucker |
| Indexes: | [Date] [Thread] [Top] [All Lists] |