-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Francis,
On 6/15/2011 4:00 PM, Francis GALIEGUE wrote: > Proposal: implement a command to Bootstrap which: > > * does NOT return until ALL webapps configured at start time are > (attempted to be) deployed; > * exits with a positive error code representing the number of webapps > NOT correctly deployed (or 1 - I don't care as long as it's not 0, but > please not -1, think WIFSIGNALED()). The above requirements actually might not be possible in a reasonably simple system. First off, the JVM provides no pure-Java way of letting a process go into the background. So, there's really no opportunity to do some work in Java and /then/ return to the calling process without terminating. Second, an OS return code requires a process termination, and you certainly don't want to terminate the JVM you've just started. About the best we could do is change catalina.sh from roughly this: java org.apache.tomcat.Bootstrap >> logs/catalina.out & to this: java org.apache.tomcat.Bootstrap >> logs/catalina.out & tail -f logs/catalina.out | grep -m 1 "INFO: Server startup" exit 0 There are some problems with this approach: 1. It's not foolproof... if your server is insanely fast, it might start before tail | grep runs, and you might wait forever 2. The log messages are localized, so you'll have to use the proper localized message instead of just "INFO: Server startup" 3. This is so simple that you should be able to do it yourself Does this really need to be a part of the stock Tomcat? I'm not convinced that this exact solution would meet everyone's needs so it would need to be further customized, anyway. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk36TVwACgkQ9CaO5/Lv0PC1FACfavGOD003FL1iBN7R8EKSifbG 7ScAmgPbZmdCFPDBZFm9MXckpY1x08Dh =3tOa -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org