Results 1 to 2 of 2
Hello, I try to start a program on my linux server, but the program should start on the background. i typed: /map/map/theprogram & in the rc.local file but the program ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-19-2007 #1
- Join Date
- Jan 2007
Starting a program on the background
I try to start a program on my linux server,
but the program should start on the background.
in the rc.local file
but the program only seems to work when it is opend in a screen so i made it:
screen /map/map/theprogram &
and thats the way it works.
only the rest of the startup is going over the screen and isn't readable any more.
so i want to find a way to start the program in a screen but on the background. or the screen should be closed again before the rest or the reboot.
is there a way i can fix this?
Im kind of new in linux so i hope you can help me out.
- 04-05-2007 #2
- Join Date
- May 2006
When you close your window, a "HUP" signal is sent to any processes that it started which tells them to stop. If you do
It places the "script" into the backgroud of your current session, but when you close the window, it will receive the "HUP" signal and exit. What you want to do is to tell it to ignore the "HUP" signal and keep running. You can do this with:
nohup /path/to/file/script &
Now, when you close the window, it will keep running.