Computing.Net > Forums > Solaris > Non root user processes dies

Non root user processes dies

Reply to Message Icon

Original Message
Name: Stefan
Date: February 19, 2003 at 02:36:28 Pacific
Subject: Non root user processes dies
OS: Solaris 8
CPU/Ram: doesn´t matter
Comment:

Hi!
My problem:
I run a background process as a non root user
but when I close the terminal window the process dies and all child processes also.
This does not happen when I start the process from a BASH shell though.

This is a java process and the line in the script that starts the process looks like this:

exec su $USER -c "exec my_commands > /dev/null 2>&1" &



Report Offensive Message For Removal


Response Number 1
Name: Hamid
Date: February 19, 2003 at 05:01:28 Pacific
Subject: Non root user processes dies
Reply: (edit)

Why not try nohup command, the process will continue to run when you terminate your session:
try something like this:
nohup su $USER -c "exec my_commands > /dev/null 2>&1" &

Mind you nohup may get confused with redirect ">" output as it produces its own output file called nohup.out



Report Offensive Follow Up For Removal

Response Number 2
Name: Stefan
Date: February 19, 2003 at 05:46:48 Pacific
Subject: Non root user processes dies
Reply: (edit)

Works perfect, thanks alot for your quick answer.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Non root user processes dies

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge