[NTLUG:Discuss] OT: Why does remote command over ssh not return control?
Jerome Haltom
wasabi at larvalstage.net
Tue Jun 5 17:21:26 CDT 2007
Or `disown`.
On Tue, 2007-06-05 at 13:52 -0500, Kenneth Loafman wrote:
> Dennis Daupert wrote:
> > Jerome Haltom said:
> >
> >> If the script spawns a background process without disowning it,
> >> that would do it.
> >
> > This must be the critter that's doing what you suggest, I think:
> >
> > start_task()
> > {
> > echo "Starting $2"
> > eval "nohup $1 &"
> > }
> >
> > Is there a command or flag I can add in there to disengage?
>
> The ssh man page says:
>
> "The session terminates when the command or shell on the remote machine
> exits and all X11 and TCP connections have been closed."
>
> The only way I know to detach a process so ssh will close is to use
> "screen -d -m $1" (no eval and no ampersand). This will detach the
> process from ssh and allow ssh to close.
>
> ...Ken
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
More information about the Discuss
mailing list