Start process independent from TERMINAL (or also with PPID 1)

Hi *,

please, I need fast tip (help). I have a process starting through /etc/rc3.d/xxxx script. However, sometimes (mostly because of testing reasons) I need to stop the process, change something and then start it again. But:
1) when I start it in terminal, the process dies when I leave the terminal.
2) I tried the command :
nohup <script_file> &

but it's not working correctly. The best will be if there is a possibility to start the process INDEPENDENT from terminal (so when I close it it will not die) and that the process has PPID 1 (like it was started from rd3.d).

is there some way to do this ?

thanks you all for fast reply and help :frowning:

best regards
Marek

  1. best way should be..

in side ur process, use techniques to detach from the terminal and run as the first step.

  1. nohup should work properly !! what is not working ?

Try detaching the process from your tty. This sometimes help:

 nohup script-file </dev/null >/dev/null 2>&1