Hello, we are running several ant tasks under various OS like Linux 2.6, Solaris 9/10 (X86_64/Sparc), HP UX and under all OS ant 1.6.5 has problems when running with nohup command. Nohup is an old *nix command which catches the SIGTERM signal while you are running a program and it's writing a logfile from STDOUT to nohup.out. So far so good, but if we run a ant task which takes several hours to complete and we don't wan't to wait until this job is finished, we just close our SSH terminal and the job normally keeps going. This is the normal behavior with ant 1.6.2 but at ant 1.6.5, task are halting suddenly if we close a terminal and on the different terminal we can see that unix processes still exists, but doing nothing. This is alway reproducible and if we switch back to ant 1.6.2 everything is working fine, the environment hasn't changed meanwhile.
Did you try running Ant with -noinput? This may help with nohup. --DD
No i didn't try this parameter. I'll test it and will come back later.
You need to redirect all standard handles to /dev/null: nohup ant ....... >/dev/null 2>/dev/null </dev/null&
Why should i do this, it wasn't necessary at version 1.6.2 ? If I'm doing this way, all log information which is beeing written to STDOUT is lost.
I would think you changed Java version as well. In order to preserve output do the following: nohup ant ... >build.log 2>&1 </dev/null& tail -f build.log Or maybe 2>&1 should be before >build.log - I always forget how it implemented.
-noinput seems to solve the problem with nohup. What has changed from ant 1.6.2 to 1.6.5 that this parameter must be set ? It's really annoying to type always -noinput, the command lines already long enough... ;-)
Ant recently added the ability to do input. Before this was done, Ant never did any input, so the problem never occured. -noinput allows to get that this older beahvior. Glad to hear it works for you. --DD PS: I would guess </dev/null should also work, but I'm not sure.
*** This bug has been marked as a duplicate of bug 34461 ***