tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bradleymccrorey <bradley.mccro...@contegix.com>
Subject Re: Using eval vs. exec in shell scripts
Date Sun, 26 Jun 2011 15:35:34 GMT


Rainer Jung-3 wrote:
> 
> 
> Did you follow the later messages in this discusison thread?
> 
> I made an error in not including all quotes use din catalina.sh in my
> simpl test script. So when using the correct scripts, the eval did *not*
> leave a copy of the shel process hanging around.
> 

I certainly did, but obviously didn't understand that things were working as
expected. Please let me know if I'm misunderstanding.

However, if you're saying that the default scripts are working, then I'll
definitely have to dispute this. 

Observe:



> [root@c37f9170a86c583d8a16fc7e60e759cf test]# curl -L
> http://www.fightrice.com/mirrors/apache/tomcat/tomcat-7/v7.0.16/bin/apache-tomcat-7.0.16.tar.gz
> |tar xzf -
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time 
> Current
>                                  Dload  Upload   Total   Spent    Left 
> Speed
> 100 7067k  100 7067k    0     0  10.0M      0 --:--:-- --:--:-- --:--:--
> 10.2M
> [root@c37f9170a86c583d8a16fc7e60e759cf test]# cd apache-tomcat-7.0.16/
> [root@c37f9170a86c583d8a16fc7e60e759cf apache-tomcat-7.0.16]#
> bin/catalina.sh run
> Using CATALINA_BASE:   /root/test/apache-tomcat-7.0.16
> Using CATALINA_HOME:   /root/test/apache-tomcat-7.0.16
> Using CATALINA_TMPDIR: /root/test/apache-tomcat-7.0.16/temp
> Using JRE_HOME:        /usr
> Using CLASSPATH:      
> /root/test/apache-tomcat-7.0.16/bin/bootstrap.jar:/root/test/apache-tomcat-7.0.16/bin/tomcat-juli.jar
> Jun 26, 2011 10:50:22 AM org.apache.catalina.core.AprLifecycleListener
> init
> ...
> INFO: Starting ProtocolHandler ["http-bio-8080"]
> Jun 26, 2011 10:50:22 AM org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["ajp-bio-8009"]
> Jun 26, 2011 10:50:22 AM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 648 ms
> 
> [1]+  Stopped                 bin/catalina.sh run
> [root@c37f9170a86c583d8a16fc7e60e759cf apache-tomcat-7.0.16]# bg
> [1]+ bin/catalina.sh run &
> [root@c37f9170a86c583d8a16fc7e60e759cf apache-tomcat-7.0.16]# ps auxww
> |grep catalina
> root      1611  0.0  0.4   4576  1116 pts/0    S    10:50   0:00 /bin/sh
> bin/catalina.sh run
> root      1622 14.5 11.0 650752 28236 pts/0    Sl   10:50   0:01
> /usr/bin/java
> -Djava.util.logging.config.file=/root/test/apache-tomcat-7.0.16/conf/logging.properties
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -Djava.endorsed.dirs=/root/test/apache-tomcat-7.0.16/endorsed -classpath
> /root/test/apache-tomcat-7.0.16/bin/bootstrap.jar:/root/test/apache-tomcat-7.0.16/bin/tomcat-juli.jar
> -Dcatalina.base=/root/test/apache-tomcat-7.0.16
> -Dcatalina.home=/root/test/apache-tomcat-7.0.16
> -Djava.io.tmpdir=/root/test/apache-tomcat-7.0.16/temp
> org.apache.catalina.startup.Bootstrap start
> root      1643  0.0  0.2   4000   660 pts/0    S+   10:50   0:00 grep
> catalina
> 

You can clearly see here that there are two processes: one for the shell
script, and one for the actual java process. Is this not what I should be
seeing?

Cheers,
Bradley McCrorey
-- 
View this message in context: http://old.nabble.com/Using-eval-vs.-exec-in-shell-scripts-tp31884910p31931562.html
Sent from the Tomcat - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message