l3golas
l3golas

Reputation: 97

Strange behavior of "Run in terminal", it kills processes

I wrote a shell script that runs a service. I open the terminal, I run the script that runs the service and, after the script ends, I close the terminal but the service keeps running, and this is what I want.

Anyway, if I run the script through the Gnome command "Run in terminal", when the terminal closes, also the service is killed.

That's very strange, I can't understand why and I'm not able to solve this problem.

Any ideas?

Upvotes: 0

Views: 93

Answers (1)

user000001
user000001

Reputation: 33317

Try executing

nohup ./shell_script & 

nohup command makes the process continue executing even after the terminal has closed, ignoring the SIGHUP signal.

Note the script will execute in the background, and the output will be appended to a file.

Upvotes: 2

Related Questions