Note that there are some explanatory texts on larger screens.

plurals
  1. PODisown shell once a process get started using shell script
    primarykey
    data
    text
    <p>I am trying to write a script for starting tomcat server which get disassociated from the shell once the execution of the script complete. For example please see below snapshot of the screen.</p> <pre><code>bash-3.00# ./startup.sh Using CATALINA_BASE: /opt/tomcat/6.0.32 Using CATALINA_HOME: /opt/tomcat/6.0.32 Using CATALINA_TMPDIR: /opt/tomcat/6.0.32/temp Using JRE_HOME: /opt/jdk1.6.0_26/ Using CLASSPATH: /opt/tomcat/6.0.32/bin/bootstrap.jar bash-3.00# ps -eaf | grep tomcat root 4737 2945 0 02:45:53 pts/24 0:00 grep tomcat root 4734 29777 1 02:45:42 pts/24 0:19 /opt/jdk1.6.0_26//bin/java -Djava.util.logging.config.file=/opt/tomcat/6.0.32/c </code></pre> <p>Now as you can see that once the execution of the script complete the tomcat process is associated with pts/24 till I close the shell. But what I want is that even if the shell is kept open the process should show a behavior like below </p> <pre><code>bash-3.00# ps -eaf | grep tomcat root 13985 2945 0 22:40:13 pts/24 0:00 grep tomcat root 13977 29777 1 22:40:01 ? 0:22 /opt/jdk1.6.0_26//bin/java -Djava.util.logging.config.file=/opt/tomcat/6.0.32// </code></pre> <p>The operating System is Solaris. The various option I used to accomplish the same are using nohup, and disown but still the process is associated with shell. </p> <p>The other mechanism is to put in crontab or use svc to make the process start as system comes up i.e. daemon or we can write a small C program which forks a process and goes away. </p> <p>Here please note that the process is running in background.</p> <p>But I want to achieve the same using a shell or perl script. So any thought on the same will help me a lot.</p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload