Thanks carrol,

Your logic makes sense. Also the solution is working just fine ..
I also opened the std o/p along with the stdin as u had suggested.
May be the application is internally trying to write to stdout and if its
finding that the
terminal is closed its commiting a suicide,

Regds,
RCP







"Rick Carroll" <[EMAIL PROTECTED]> on 01/17/2003 07:51:48 PM

Please respond to [EMAIL PROTECTED]
                                                              
                                                              
                                                              
  To:          [EMAIL PROTECTED]                         
                                                              
  cc:          (bcc: Ramesh Pathak/Satyam)                    
                                                              
                                                              
                                                              
  Subject      RE: How to detatch a process from the terminal 
  :                                                           
                                                              







Perhaps your process needs to see an input stream (stdin) and is dying when
stdin closes.
I'm not sure this is happening under nohup, but it's worth a try.
Try:

#nohup ./startserver.sh & < /dev/null

I had a problem similar to this years ago trying to run:
"shutdown -y -g0 -i6" on sun machines via rsh after installing new application
code.
As soon as I added "< /dev/null" the machines started rebooting as I wanted.

Rick.

 -----Original Message-----
From:     Ramesh Pathak [mailto:[EMAIL PROTECTED]]
Sent:     Friday, January 17, 2003 2:51 AM
To:  [EMAIL PROTECTED]
Subject:  How to detatch a process from the terminal



Hi everybody,
I am running an application as a daemon.
This need to keep running in the background. I started this
through a shell script after setting up the environmental variables there.
The application is running just fine till I am keeping the session open.
But as soon as I close the session, the application gets killed.
I tried a lots of permutations --running as different user( even troot user),
different environment settings,
starting from the console etc ..and using nohup command too, but to no
advantage.

I am connecting to the server through a SSH connection from my desktop.
And to start the server I fire it like the following:
#nohup ./startserver.sh &

Can anybody help there.
Here is the output of ps -ef |grep .. command:

root  5890  5883  0 11:56:04 pts/5    0:23 /usr/j2se/bin/..

I feel that the entry "pts5" is the culprit. the process is getting attatched to
this tele-terminal and hence
getting killed as soon as I close my window.

REgds,
RCP




--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list




--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list





-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to