View Single Post

   
  #3 (permalink)  
Old 01-18-2008, 05:34 AM
Lawrence DčOliveiro
 
Posts: n/a
Default Re: Start scripts under linux

In article <Xns959AA26D0EEF5SunnySD@68.6.19.6>,
"IANAL_VISTA" <IANAL_Vista@hotmail.com> wrote:

>Some how I doubt the "su" is really required.
>
>FWIW - the line "java myprogram &" has the java process running "in the
>backkground"; BUT it still depend upon its parent process to stay alive.
>This is because the background process is a child process of its parent;
>the process from which "java myprogram &" was issued. When the parent
>process dies the child process gets terminated.
>
>The "nohup" (no hangup) instructs the OS to allow the process to stay alive
>after the parent process terminates.


Let me just add to this that most of the programs being run from init.d
scripts make their own provisions for running detached from the
invoker's terminal and process group, by using the fork(2) and setsid(2)
system calls.

If the original poster has access to the Java source code, it could
probably be modified to do the same.
Reply With Quote