ssh -> perl -> spawn background proces hangs ssh session
I have a back-up policy that logs into machines to run a perl script. This script runs processes like database listeners or apachectl processes.
These processes do daemonize, but they get stuck attached to the logon terminal, making ssh to hang on exit. You'll have to break the process to regain control of the tty (or interactively, use '\n~.' to terminate the ssh session).
On bash scripting, the solution mostly is redirection of input / output, like: 'apachectl </dev/null &>/dev/null'.
In perl, however, this doesn't seem to work..
Any of you who has experienced this before and know of a solution to this?? I can't seem to be able to find a proper solution to this.