Re: Forcing screen to stay open after [cmd] is completed...

Sadrul Habib Chowdhury <[email protected]>
Newsgroups gmane.comp.gnu.screen.user
Message-ID <CACdzHCgqejurbsgs+p3JX06rfO9hPQX4TqgfUWzUL=4s4GVxyw@mail.gmail.com>
On Fri, Aug 19, 2011 at 2:30 AM, Zak Kinion <[email protected]> wrote:
> Hello all,
>
> Basically my goal is:
>
> run screen:
>
> screen -d -m python myscript.py

You can use something like
    $ screen -d -m -c zombie python myscript.py

where
    $ cat zombie
    zombie qp
    $

This will keep the terminated window around, so you can attach, and
then press 'q' to close, or 'p' to rerun the script if you wanted to.

Sadrul

> which then moves it into the background.  myscript.py also launches
> some other python scripts over time.
>
> However, once myscript.py ends, then all the other scripts are gone
> forever, since the screen closes too.  They are not running at all
> under ps aux | grep otherscript.py
>
>
> I CAN just simply go:
>
> screen
>
> and hit enter after the welcome message, and then run:  python
> myscript.py and all is well....
>
> However this takes a lot longer and is harder for me to automate for my means.
>
>
> I'm basically looking for one command or argument that I can send to
> screen to have it run:
>
> screen -d -m python myscript.py   and NOT die when myscript.py terminates.
>
>
> Thank you
>
> --
> Zak Kinion
> [email protected]
>
> _______________________________________________
> screen-users mailing list
> screen-users-mXXj517/[email protected]
> https://lists.gnu.org/mailman/listinfo/screen-users
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.