hey guys...

got a much simpler issue/question...

I thought I had been running the remote cmd within the screen named
session.. upon further testing.. I may not have actually been running
it in the screen session.. perhaps outside of the session..

I think this works....

//--fire up the named screen session..
ssh crawl_user@192.81.214.49 "screen -d -m -S 'testname' "

//fire up the "long running cmd....
ssh  -t crawl_user@192.81.214.49  "screen -r -S testname  -X stuff
'sleep 60'$(echo -ne '\015')  "

i've tested this with sleeping of different times, as well as diff sys
commands.. it seems to work ok...

I'll do more testing of course!

I've been able to do the proc tbl (ps) to see that the cmds are being
run.. and in checking the screen/session.. it is definitely detached.

As a check to ensure that this really works... I did a sleep test,
without the echo -ne '\015' -- which generates the newline..

This checked out that the screen session was attached...

So, I think this is ok...

Thoughts/Comments




On Mon, Nov 14, 2016 at 3:01 PM, Tom Horsley <horsley1...@gmail.com> wrote:
> On Mon, 14 Nov 2016 14:13:48 -0500
> bruce wrote:
>
>> It only detaches after the process completes!!
>
> ssh goes to fantastic amounts of trouble to invent
> ridiculous file descriptors it can wait on till
> they close (specifically to prevent you from
> exiting an ssh session and leaving anything running).
>
> I use the bg-dammit program I wrote to actually
> for Gosh sakes background stuff. You can find the source
> on this web page:
>
> http://tomhorsley.com/game/Mjolnir.html
>
> (you might need to tweak things like debug
> logging code that has hard coded file paths :-).
> _______________________________________________
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org

Reply via email to