2

My goal is to start bunch of processes from bash in screen but screen should not terminate after the process running in it ends or stops with error.

So im going to do someting like:

do a config file for screen(screen.conf):

screen -t myscreen0 0 myscript.sh;

screen -t myscreen1 1 myscript.sh;

screen -t myscreen2 2 myscript.sh;

screen -t myscreen2 2 myscript.sh;

Start it with screen -c screen.conf

But now when scripts end or get an error screen is terminating.

I found that zombie parameter could help me but i dont now how to use it(poorly described in man page). Or maybe there is another way to solve this problem.

3

2 Answers 2

1

Your requirement "screen should not terminate when the program running in it ends" cannot be satisfied.

Even when you think you're just running screen, without a program it still runs a shell.

When that exits, so does screen.

So you will have to start the initial screen with a program that... does not exit :)

0

I did it by adding zombie z parameter in screen config something like


zombie z 
screen -t myscreen0 0 myscript.sh;

screen -t myscreen1 1 myscript.sh;

screen -t myscreen2 2 myscript.sh;

screen -t myscreen2 2 myscript.sh;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .