Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Does nohup not work for you? –  moodywoody Jun 15 '12 at 12:00
    
@moodywoody Hmmmm what do you mean ? –  B14D3 Jun 15 '12 at 12:06
    
nohup - cyberciti.biz/tips/… –  moodywoody Jun 15 '12 at 12:06

2 Answers 2

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 :)

share|improve this answer
up vote 0 down vote accepted

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;
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.