svn commit: r428683 - /jakarta/commons/proper/daemon/trunk/src/samples/build.xml
Author: jfclere Date: Fri Aug 4 03:22:48 2006 New Revision: 428683 URL: http://svn.apache.org/viewvc?rev=428683view=rev Log: Use a better location. Modified: jakarta/commons/proper/daemon/trunk/src/samples/build.xml Modified: jakarta/commons/proper/daemon/trunk/src/samples/build.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/daemon/trunk/src/samples/build.xml?rev=428683r1=428682r2=428683view=diff == --- jakarta/commons/proper/daemon/trunk/src/samples/build.xml (original) +++ jakarta/commons/proper/daemon/trunk/src/samples/build.xml Fri Aug 4 03:22:48 2006 @@ -6,7 +6,7 @@ property name=dist.home value=../../dist/ property name=build.home value=./build/ property name=source.home value=./ - property name=commons-collections.jar value=${user.home}/commons-collections-3.1/commons-collections-3.1.jar/ + property name=commons-collections.jar value=${user.home}/java/commons-collections-3.1/commons-collections-3.1.jar/ target name=jars depends=SimpleDaemon,ServiceDaemon,AloneService/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r410147 - /jakarta/commons/proper/daemon/trunk/build.properties.sample
Author: jfclere Date: Mon May 29 13:00:22 2006 New Revision: 410147 URL: http://svn.apache.org/viewvc?rev=410147view=rev Log: Add hint for proxy. Modified: jakarta/commons/proper/daemon/trunk/build.properties.sample Modified: jakarta/commons/proper/daemon/trunk/build.properties.sample URL: http://svn.apache.org/viewvc/jakarta/commons/proper/daemon/trunk/build.properties.sample?rev=410147r1=410146r2=410147view=diff == --- jakarta/commons/proper/daemon/trunk/build.properties.sample (original) +++ jakarta/commons/proper/daemon/trunk/build.properties.sample Mon May 29 13:00:22 2006 @@ -4,3 +4,8 @@ # The pathname of the junit.jar JAR file junit.jar = ${junit.home}/junit.jar + +# Proxy +# proxy +maven.proxy.host = proxy.domain +maven.proxy.port = 80 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r410148 - /jakarta/commons/proper/daemon/trunk/README
Author: jfclere Date: Mon May 29 13:05:53 2006 New Revision: 410148 URL: http://svn.apache.org/viewvc?rev=410148view=rev Log: Add ref to the right documentation. Modified: jakarta/commons/proper/daemon/trunk/README Modified: jakarta/commons/proper/daemon/trunk/README URL: http://svn.apache.org/viewvc/jakarta/commons/proper/daemon/trunk/README?rev=410148r1=410147r2=410148view=diff == --- jakarta/commons/proper/daemon/trunk/README (original) +++ jakarta/commons/proper/daemon/trunk/README Mon May 29 13:05:53 2006 @@ -17,7 +17,7 @@ cd src/native/nt/procrun; make (It is also possible to use the m$ developement tools). -To build the documentation: +To build the documentation: (See http://jakarta.apache.org/commons/building.html). maven site:generate (Do not forget to get ../commons-build: (cd ..; svn co http://svn.apache.org/repos/asf/jakarta/commons/proper/commons-build/trunk/ commons-build)) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r410149 - /jakarta/commons/proper/daemon/trunk/xdocs/faq.xml
Author: jfclere Date: Mon May 29 13:11:43 2006 New Revision: 410149 URL: http://svn.apache.org/viewvc?rev=410149view=rev Log: Add a note about space in directory names. Modified: jakarta/commons/proper/daemon/trunk/xdocs/faq.xml Modified: jakarta/commons/proper/daemon/trunk/xdocs/faq.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/daemon/trunk/xdocs/faq.xml?rev=410149r1=410148r2=410149view=diff == --- jakarta/commons/proper/daemon/trunk/xdocs/faq.xml (original) +++ jakarta/commons/proper/daemon/trunk/xdocs/faq.xml Mon May 29 13:11:43 2006 @@ -68,5 +68,17 @@ /p /section +section name=Cygwin configuration problems +p +The configure of jsvc does not like spaces in directory name. +To configure with java installed in directory whose name contains a space, +use the 8 characters name of the directory. +For example for java in installed in codec:\Archivos de programa\java\jdk1.5.0_06/code: +source +./configure --with-java=/cygdrive/c/Archiv~1/java/jdk1.5.0_06 +/source +/p +/section + /body /document - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r410151 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c
Author: jfclere Date: Mon May 29 13:45:22 2006 New Revision: 410151 URL: http://svn.apache.org/viewvc?rev=410151view=rev Log: Add support for gij (GNU libgcj). Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c URL: http://svn.apache.org/viewvc/jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c?rev=410151r1=410150r2=410151view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c Mon May 29 13:45:22 2006 @@ -114,6 +114,8 @@ $JAVA_HOME/jre/lib/ CPU /hotspot/libjvm.sl, $JAVA_HOME/jre/lib/ CPU /classic/libjvm.sl, #endif +/usr/lib/libgcj.so.7, /* gcc java libraries */ +/usr/lib/libgcj.so.6, NULL, }; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r410153 - in /jakarta/commons/proper/daemon/trunk/src/native/unix: Makedefs.in native/Makefile.in support/apsupport.m4
Author: jfclere Date: Mon May 29 14:05:17 2006 New Revision: 410153 URL: http://svn.apache.org/viewvc?rev=410153view=rev Log: Fix PR 39569 (Add LIBS in the make logic). Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/Makedefs.in jakarta/commons/proper/daemon/trunk/src/native/unix/native/Makefile.in jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/Makedefs.in URL: http://svn.apache.org/viewvc/jakarta/commons/proper/daemon/trunk/src/native/unix/Makedefs.in?rev=410153r1=410152r2=410153view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/Makedefs.in (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/Makedefs.in Mon May 29 14:05:17 2006 @@ -15,13 +15,14 @@ # # @author Pier Fumagalli mailto:[EMAIL PROTECTED] -# @version $Id: Makedefs.in,v 1.2 2004/02/27 08:40:46 jfclere Exp $ +# @version $Id$ CC = @CC@ JAVAC = @JAVAC@ JAR = @JAR@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ JAVACFLAGS = @JAVACFLAGS@ RANLIB = @RANLIB@ LDCMD = @LDCMD@ Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/Makefile.in URL: http://svn.apache.org/viewvc/jakarta/commons/proper/daemon/trunk/src/native/unix/native/Makefile.in?rev=410153r1=410152r2=410153view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/Makefile.in (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/Makefile.in Mon May 29 14:05:17 2006 @@ -36,7 +36,7 @@ $(RANLIB) libservice.a jsvc: jsvc-unix.o libservice.a - $(LDCMD) $(LDFLAGS) jsvc-unix.o libservice.a -o ../jsvc + $(LDCMD) $(LDFLAGS) jsvc-unix.o libservice.a $(LIBS) -o ../jsvc clean: rm -f $(OBJS) ../jsvc jsvc-unix.o libservice.a Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 URL: http://svn.apache.org/viewvc/jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4?rev=410153r1=410152r2=410153view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 Mon May 29 14:05:17 2006 @@ -30,12 +30,12 @@ solaris*) CFLAGS=$CFLAGS -DOS_SOLARIS -DDSO_DLFCN supported_os=solaris -LDFLAGS=$LDFLAGS -ldl -lthread +LIBS=$LIBS -ldl -lthread ;; linux*) CFLAGS=$CFLAGS -DOS_LINUX -DDSO_DLFCN supported_os=linux -LDFLAGS=$LDFLAGS -ldl -lpthread +LIBS=$LIBS -ldl -lpthread ;; cygwin) CFLAGS=$CFLAGS -DOS_CYGWIN -DDSO_DLFCN -DNO_SETSID @@ -43,11 +43,12 @@ ;; sysv) CFLAGS=$CFLAGS -DOS_SYSV -DDSO_DLFCN -LDFLAGS=$LDFLAGS -ldl +LIBS=$LIBS -ldl ;; sysv4) CFLAGS=$CFLAGS -DOS_SYSV -DDSO_DLFCN -Kthread -LDFLAGS=-Kthread $LDFLAGS -ldl +LDFLAGS=-Kthread $LDFLAGS +LIBS=$LIBS -ldl ;; freebsd*) CFLAGS=$CFLAGS -DOS_FREEBSD -DDSO_DLFCN -D_THREAD_SAFE -pthread @@ -60,7 +61,8 @@ ;; hpux11*) CFLAGS=$CFLAGS -pthread -DOS_HPUX -DDSO_DLFCN -LDFLAGS=$LDFLAGS -pthread -lpthread +LDFLAGS=$LDFLAGS -pthread +LIBS=$LIBS -lpthread ;; *) AC_MSG_RESULT([failed]) @@ -83,7 +85,8 @@ bs2000) CFLAGS=$CFLAGS -DCPU=\\\osd\\\ -DCHARSET_EBCDIC -DOSD_POSIX supported_os=osd -LDFLAGS=-Kno_link_stdlibs -B llm4 -l BLSLIB +LDFLAGS=-Kno_link_stdlibs -B llm4 +LIBS=$LIBS -lBLSLIB LDCMD=/opt/C/bin/cc HOST_CPU=osd;; mips) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r408993 - /jakarta/commons/proper/daemon/trunk/src/native/nt/README
Author: jfclere Date: Tue May 23 12:56:31 2006 New Revision: 408993 URL: http://svn.apache.org/viewvc?rev=408993view=rev Log: Add a line because the Makefile does not create the dist directory. Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/README Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/README URL: http://svn.apache.org/viewvc/jakarta/commons/proper/daemon/trunk/src/native/nt/README?rev=408993r1=408992r2=408993view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/nt/README (original) +++ jakarta/commons/proper/daemon/trunk/src/native/nt/README Tue May 23 12:56:31 2006 @@ -1,5 +1,9 @@ (Please have a look to procrun (subdirectory), procrun is probably what you have to use). + +Note: MAKE SURE you first build the java part (using ant) otherwise the dist +directory is not created). + To build the service utilities for windows you will need: - MS Visual C++ (I have used version 5.0). - CYGWIN to build the jsvc.exe. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r408996 - in /jakarta/commons/proper/daemon/trunk/src/native/nt: Makefile moni/Makefile service/Makefile
Author: jfclere Date: Tue May 23 13:03:46 2006 New Revision: 408996 URL: http://svn.apache.org/viewvc?rev=408996view=rev Log: Add a clean target. Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/Makefile jakarta/commons/proper/daemon/trunk/src/native/nt/moni/Makefile jakarta/commons/proper/daemon/trunk/src/native/nt/service/Makefile Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/Makefile URL: http://svn.apache.org/viewvc/jakarta/commons/proper/daemon/trunk/src/native/nt/Makefile?rev=408996r1=408995r2=408996view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/nt/Makefile (original) +++ jakarta/commons/proper/daemon/trunk/src/native/nt/Makefile Tue May 23 13:03:46 2006 @@ -1,3 +1,6 @@ all: (cd service; make) (cd moni; make) +clean: + (cd service; make clean) + (cd moni; make clean) Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/moni/Makefile URL: http://svn.apache.org/viewvc/jakarta/commons/proper/daemon/trunk/src/native/nt/moni/Makefile?rev=408996r1=408995r2=408996view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/nt/moni/Makefile (original) +++ jakarta/commons/proper/daemon/trunk/src/native/nt/moni/Makefile Tue May 23 13:03:46 2006 @@ -13,3 +13,5 @@ gcc $(INCLUDE) -c ../supcalls_nt/vdenv.c kills.o: ../signals/kills.c gcc $(INCLUDE) -c ../signals/kills.c +clean: + rm -f vdenv.o kills.o Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/service/Makefile URL: http://svn.apache.org/viewvc/jakarta/commons/proper/daemon/trunk/src/native/nt/service/Makefile?rev=408996r1=408995r2=408996view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/nt/service/Makefile (original) +++ jakarta/commons/proper/daemon/trunk/src/native/nt/service/Makefile Tue May 23 13:03:46 2006 @@ -5,3 +5,5 @@ gcc -c $(INCLUDE) ../../unix/native/arguments.c debug.o: ../../unix/native/debug.c gcc -c $(INCLUDE) ../../unix/native/debug.c +clean: + rm -f arguments.o debug.o - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r397475 - /jakarta/commons/proper/daemon/trunk/src/samples/Native.sh
Author: jfclere Date: Thu Apr 27 01:27:33 2006 New Revision: 397475 URL: http://svn.apache.org/viewcvs?rev=397475view=rev Log: Add support of the MAC OS X. (Darwin). Modified: jakarta/commons/proper/daemon/trunk/src/samples/Native.sh Modified: jakarta/commons/proper/daemon/trunk/src/samples/Native.sh URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/samples/Native.sh?rev=397475r1=397474r2=397475view=diff == --- jakarta/commons/proper/daemon/trunk/src/samples/Native.sh (original) +++ jakarta/commons/proper/daemon/trunk/src/samples/Native.sh Thu Apr 27 01:27:33 2006 @@ -13,6 +13,20 @@ ## See the License for the specific language governing permissions and ## limitations under the License. ## -# for linux ;-) -gcc -c -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux Native.c -gcc -shared -o Native.so Native.o +# for linux ;-) and Mac OS X +case `uname -s` + Darwin) +JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK +INCLUDE=Headers +OS= +FLAGS=-dynamiclib +;; + Linux) +OS=linux +INCLUDE=include +FLAGS=-shared +;; +esac + +gcc -c -I${JAVA_HOME}/${INCLUDE} -I${JAVA_HOME}/${INCLUDE}/${OS} Native.c +gcc ${FLAGS} -o Native.so Native.o - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r397477 - /jakarta/commons/proper/daemon/trunk/src/samples/Native.sh
Author: jfclere Date: Thu Apr 27 01:37:44 2006 New Revision: 397477 URL: http://svn.apache.org/viewcvs?rev=397477view=rev Log: Typo sorry. Modified: jakarta/commons/proper/daemon/trunk/src/samples/Native.sh Modified: jakarta/commons/proper/daemon/trunk/src/samples/Native.sh URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/samples/Native.sh?rev=397477r1=397476r2=397477view=diff == --- jakarta/commons/proper/daemon/trunk/src/samples/Native.sh (original) +++ jakarta/commons/proper/daemon/trunk/src/samples/Native.sh Thu Apr 27 01:37:44 2006 @@ -14,7 +14,7 @@ ## limitations under the License. ## # for linux ;-) and Mac OS X -case `uname -s` +case `uname -s` in Darwin) JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK INCLUDE=Headers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r397480 - /jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java
Author: jfclere Date: Thu Apr 27 01:58:27 2006 New Revision: 397480 URL: http://svn.apache.org/viewcvs?rev=397480view=rev Log: Typo. Modified: jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java Modified: jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java?rev=397480r1=397479r2=397480view=diff == --- jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java (original) +++ jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java Thu Apr 27 01:58:27 2006 @@ -240,7 +240,7 @@ out.println(4) Disconnect); out.println(5) Cause a core of the JVM); out.println(6) Create a directory); -out.print(Your choiche: ); +out.print(Your choice: ); } /* Read an option from the client */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r397485 - /jakarta/commons/proper/daemon/trunk/src/samples/Native.c
Author: jfclere Date: Thu Apr 27 02:18:47 2006 New Revision: 397485 URL: http://svn.apache.org/viewcvs?rev=397485view=rev Log: On Darwin the memcpy does not core. Modified: jakarta/commons/proper/daemon/trunk/src/samples/Native.c Modified: jakarta/commons/proper/daemon/trunk/src/samples/Native.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/samples/Native.c?rev=397485r1=397484r2=397485view=diff == --- jakarta/commons/proper/daemon/trunk/src/samples/Native.c (original) +++ jakarta/commons/proper/daemon/trunk/src/samples/Native.c Thu Apr 27 02:18:47 2006 @@ -34,6 +34,7 @@ int i; i = -1; memcpy(i, i, i); + memset(i, ' ', 1024); } #ifdef __cplusplus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r397516 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Thu Apr 27 03:36:27 2006 New Revision: 397516 URL: http://svn.apache.org/viewcvs?rev=397516view=rev Log: Also restart when the JVM process is signaled (abort is no always called). Don't change user when we are already the user. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=397516r1=397515r2=397516view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Thu Apr 27 03:36:27 2006 @@ -132,6 +132,10 @@ } else log_debug(Cannot set supplement group list for user '%s',user); } + if (getuid() == uid) { +log_debug(No need to change user to '%s'!,user); +return(0); + } if (setuid(uid)!=0) { log_error(Cannot set user id for user '%s',user); return(-1); @@ -794,7 +798,17 @@ /* Otherwise we don't rerun it */ log_error(Service exit with a return value of %d,status); return(1); + } else { +if (WIFSIGNALED(status)) { +log_error(Service killed by signal %d,WTERMSIG(status)); +/* prevent looping */ +if (laststart+60time(NULL)) { + log_debug(Waiting 60 s to prevent looping); + sleep(60); +} +continue; +} log_error(Service did not exit cleanly,status); return(1); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r397518 - /jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt
Author: jfclere Date: Thu Apr 27 03:38:15 2006 New Revision: 397518 URL: http://svn.apache.org/viewcvs?rev=397518view=rev Log: Add lastest correction. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt?rev=397518r1=397517r2=397518view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Thu Apr 27 03:38:15 2006 @@ -27,3 +27,4 @@ * fix 36058. (mask used for pid/log and load: 0077). * fix 38992. * Improve support of Mac OS X Server 10.4 + * Restart when JVM process is killed (abort is not alway called). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r397126 - /jakarta/commons/proper/daemon/trunk/build.xml
Author: jfclere Date: Wed Apr 26 00:20:56 2006 New Revision: 397126 URL: http://svn.apache.org/viewcvs?rev=397126view=rev Log: Change the default target to dist (to prevent question how do I get commons-daemon.jar). Modified: jakarta/commons/proper/daemon/trunk/build.xml Modified: jakarta/commons/proper/daemon/trunk/build.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/build.xml?rev=397126r1=397125r2=397126view=diff == --- jakarta/commons/proper/daemon/trunk/build.xml (original) +++ jakarta/commons/proper/daemon/trunk/build.xml Wed Apr 26 00:20:56 2006 @@ -1,4 +1,4 @@ -project name=Daemon default=compile basedir=. +project name=Daemon default=dist basedir=. !-- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r397132 - /jakarta/commons/proper/daemon/trunk/src/native/nt/README
Author: jfclere Date: Wed Apr 26 00:35:33 2006 New Revision: 397132 URL: http://svn.apache.org/viewcvs?rev=397132view=rev Log: Add a note about procrun. Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/README Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/README URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/nt/README?rev=397132r1=397131r2=397132view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/nt/README (original) +++ jakarta/commons/proper/daemon/trunk/src/native/nt/README Wed Apr 26 00:35:33 2006 @@ -1,3 +1,5 @@ +(Please have a look to procrun (subdirectory), procrun is +probably what you have to use). To build the service utilities for windows you will need: - MS Visual C++ (I have used version 5.0). - CYGWIN to build the jsvc.exe. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r396916 - /jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4
Author: jfclere Date: Tue Apr 25 10:04:38 2006 New Revision: 396916 URL: http://svn.apache.org/viewcvs?rev=396916view=rev Log: Arrange support for Mac OS X 10.4. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4?rev=396916r1=396915r2=396916view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 Tue Apr 25 10:04:38 2006 @@ -45,7 +45,7 @@ fi if test $JAVACSABLE = NONE then -XPATH=$JAVA_HOME/bin:$PATH +XPATH=$JAVA_HOME/bin:$JAVA_HOME/Commands:$PATH AC_PATH_PROG(JAVAC,javac,NONE,$XPATH) else AC_PATH_PROG(JAVAC,javac-sablevm,NONE,$JAVA_HOME/bin) @@ -71,7 +71,7 @@ fi if test $JARSABLE = NONE then -XPATH=$JAVA_HOME/bin:$PATH +XPATH=$JAVA_HOME/bin:$JAVA_HOME/Commands:$PATH AC_PATH_PROG(JAR,jar,NONE,$XPATH) else AC_PATH_PROG(JAR,jar-sablevm,NONE,$JAVA_HOME/bin) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r396961 - /jakarta/commons/proper/daemon/trunk/README
Author: jfclere Date: Tue Apr 25 12:34:39 2006 New Revision: 396961 URL: http://svn.apache.org/viewcvs?rev=396961view=rev Log: Put a note so that the users look to INSTALL.txt in src/native/unix. Modified: jakarta/commons/proper/daemon/trunk/README Modified: jakarta/commons/proper/daemon/trunk/README URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/README?rev=396961r1=396960r2=396961view=diff == --- jakarta/commons/proper/daemon/trunk/README (original) +++ jakarta/commons/proper/daemon/trunk/README Tue Apr 25 12:34:39 2006 @@ -6,6 +6,7 @@ cd src/native/unix; configure; make You need a gnu make. The jsvc executable could be found in dist. + There is a INSTALL.txt src/native/unix please have a look to it. On windoze the additional step is needed: cd src/native/nt; make - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r396963 - /jakarta/commons/proper/daemon/trunk/src/native/unix/INSTALL.txt
Author: jfclere Date: Tue Apr 25 12:42:52 2006 New Revision: 396963 URL: http://svn.apache.org/viewcvs?rev=396963view=rev Log: Add a note about capabilities in Linux. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/INSTALL.txt Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/INSTALL.txt URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/INSTALL.txt?rev=396963r1=396962r2=396963view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/INSTALL.txt (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/INSTALL.txt Tue Apr 25 12:42:52 2006 @@ -2,10 +2,10 @@ system you will need: An ANSI-C compliant compiler (GCC is good) - GNU AutoConf A Java Platform 2 compliant SDK + GNU AutoConf (when building for SVN). -When building from CVS sources you need to build the configure program with: +When building from SVN sources you need to build the configure program with: sh support/buildconf.sh (Note it is possible to replace sh by any compatible shell like bash, ksh). @@ -41,3 +41,7 @@ for the jsvc binary simply do ./native/jsvc -help + +Note: On Linux the module capabilities should be loaded, when using -user root +make sure you REALLY understand what capabilities does (for example for +files access: the downgraded root may not be able to read some files!). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r396993 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c
Author: jfclere Date: Tue Apr 25 14:50:36 2006 New Revision: 396993 URL: http://svn.apache.org/viewcvs?rev=396993view=rev Log: Fix PR 38992 Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c?rev=396993r1=396992r2=396993view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c Tue Apr 25 14:50:36 2006 @@ -203,6 +203,16 @@ return (NULL); } + /* -agentlib: -agentpath: -javaagent: 1.5.x JVM */ +} else if (strstr(argv[x],-agentlib:)==argv[x]) { +args-opts[args-onum++]=strdup(argv[x]); + +} else if (strstr(argv[x],-agentpath:)==argv[x]) { +args-opts[args-onum++]=strdup(argv[x]); + +} else if (strstr(argv[x],-javaagent:)==argv[x]) { +args-opts[args-onum++]=strdup(argv[x]); + } else if (strstr(argv[x],-)==argv[x]) { log_error(Invalid option %s,argv[x]); return(NULL); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r396996 - /jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt
Author: jfclere Date: Tue Apr 25 14:59:25 2006 New Revision: 396996 URL: http://svn.apache.org/viewcvs?rev=396996view=rev Log: Add what just done. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt?rev=396996r1=396995r2=396996view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Tue Apr 25 14:59:25 2006 @@ -25,3 +25,5 @@ * fix 35659. * fix 36031. * fix 36058. (mask used for pid/log and load: 0077). + * fix 38992. + * Improve support of Mac OS X Server 10.4 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r390259 - /jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4
Author: jfclere Date: Thu Mar 30 14:20:25 2006 New Revision: 390259 URL: http://svn.apache.org/viewcvs?rev=390259view=rev Log: Improve the detection of SableVM (now Ok on debian). Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4?rev=390259r1=390258r2=390259view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 Thu Mar 30 14:20:25 2006 @@ -39,11 +39,16 @@ AC_DEFUN([AP_PROG_JAVAC],[ if test $SABLEVM != NONE then -AC_PATH_PROG(JAVAC,javac-sablevm,NONE,$JAVA_HOME/bin) - else +AC_PATH_PROG(JAVACSABLE,javac-sablevm,NONE,$JAVA_HOME/bin) + fi + if test $JAVACSABLE = NONE + then XPATH=$JAVA_HOME/bin:$PATH AC_PATH_PROG(JAVAC,javac,NONE,$XPATH) + else +AC_PATH_PROG(JAVAC,javac-sablevm,NONE,$JAVA_HOME/bin) fi + AC_MSG_RESULT([$JAVAC]) if test $JAVAC = NONE then AC_MSG_ERROR([javac not found]) @@ -58,10 +63,14 @@ AC_DEFUN([AP_PROG_JAR],[ if test $SABLEVM != NONE then -AC_PATH_PROG(JAR,jar-sablevm,NONE,$JAVA_HOME/bin) - else +AC_PATH_PROG(JARSABLE,jar-sablevm,NONE,$JAVA_HOME/bin) + fi + if test $JARSABLE = NONE + then XPATH=$JAVA_HOME/bin:$PATH AC_PATH_PROG(JAR,jar,NONE,$XPATH) + else +AC_PATH_PROG(JAR,jar-sablevm,NONE,$JAVA_HOME/bin) fi if test $JAR = NONE then @@ -96,6 +105,14 @@ if test x$JAVA_HOME != x then AC_PATH_PROG(SABLEVM,sablevm,NONE,$JAVA_HOME/bin) +if test $SABLEVM = NONE +then + dnl java may be SableVM. + if $JAVA_HOME/bin/java -version 2 /dev/null | grep SableVM /dev/null + then +SABLEVM=$JAVA_HOME/bin/java + fi +fi if test $SABLEVM != NONE then AC_MSG_RESULT([Using sableVM: $SABLEVM]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r388844 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Sat Mar 25 14:09:50 2006 New Revision: 388844 URL: http://svn.apache.org/viewcvs?rev=388844view=rev Log: Start fixing PR 36050 Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=388844r1=388843r2=388844view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Sat Mar 25 14:09:50 2006 @@ -33,6 +33,12 @@ #endif #include time.h +#ifdef OS_CYGWIN +#include sys/fcntl.h +#define F_ULOCK 0 /* Unlock a previously locked region */ +#define F_LOCK 1 /* Lock a region for exclusive use */ +#endif + extern char **environ; static mode_t envmask; /* mask to create the files */ @@ -43,6 +49,33 @@ static void (*handler_int)(int)=NULL; static void (*handler_hup)(int)=NULL; static void (*handler_trm)(int)=NULL; + +#ifdef OS_CYGWIN +/* + * File locking routine + */ +static int lockf(int fildes, int function, off_t size) +{ +struct flock buf; + +switch (function) { +case F_LOCK: +buf.l_type = F_WRLCK; +break; +case F_ULOCK: +buf.l_type = F_UNLCK; +break; +default: +return -1; +} +buf.l_whence = 0; +buf.l_start = 0; +buf.l_len = size; + +return fcntl(fildes, F_SETLK, buf); +} + +#endif static void handler(int sig) { switch (sig) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r355064 - /jakarta/commons/proper/daemon/trunk/xdocs/jsvc.xml
Author: jfclere Date: Thu Dec 8 02:21:06 2005 New Revision: 355064 URL: http://svn.apache.org/viewcvs?rev=355064view=rev Log: Add a section How jsvc works. Modified: jakarta/commons/proper/daemon/trunk/xdocs/jsvc.xml Modified: jakarta/commons/proper/daemon/trunk/xdocs/jsvc.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/xdocs/jsvc.xml?rev=355064r1=355063r2=355064view=diff == --- jakarta/commons/proper/daemon/trunk/xdocs/jsvc.xml (original) +++ jakarta/commons/proper/daemon/trunk/xdocs/jsvc.xml Thu Dec 8 02:21:06 2005 @@ -159,7 +159,7 @@ p You have to write a Class (MyClass) that implements the following methods: ul - livoid init(String[] arguments): Here open the configuration files, create the trace file, create + livoid load(String[] arguments): Here open the configuration files, create the trace file, create the ServerSockets, the Threads/li livoid start(): Start the Thread, accept incomming connections/li livoid stop(): Inform the Thread to live the run(), close the ServerSockets/li @@ -168,6 +168,73 @@ Store it in a jarfile and use as above: source ./jsvc -cp commons-daemon.jar:my.jar MyClass +/source +/p +/subsection +/section +section name=How jsvc works +p +Jsvc uses 3 processes: a launcher process, a controller process and a controlled process. +The controlled process is also the main java thread, if the JVM crashes +the controller will restart it in the next minute. +Jsvc is a daemon process so it should be started as root and the -user parameter +allows to downgrade to an unprivilegded user. +When -wait parameter is used, the launcher process waits until the controller says +I am ready, otherwise it returns after creating the controller process. +/p + +subsection name=Forks in jakarta-daemon +p +Launcher process: +source +main() +{ + fork() + parent: wait_child(), wait until JAVA service started when the child says I am ready. + child: controller process. +} +/source + +Controller process: +source + while (fork()) { +parent: wait_for_child. + if exited and restart needed continue + else exit. +child: exit(child()). controlled process. + } +/source + +Controlled process: +source +In child(): controlled process. + init_JVM(). + load_service(). + start_service(). + say I am ready + wait for signal or pool for stop + stop_service(). + destroy_service(). + destroy_JVM(). + exit (with different codes so that parent knows if it has to restart us). +/source +Note: The controller process uses signals to stop the controlled process. +/p +/subsection + +subsection name=Downgrading user +p +On linux setuid()/setgid() + capabilities are used on other unix setgid/initgroups are used. + +we have something like: +source +/* as root */ +init_JVM(). +load_service. /* java_load() calls the load method */ +downgrade user (set_caps() or set_user_group()) +/* as the user $USER (from -user $USER parameter) */ +umask() +start_service. /* java_start() calls the start method */ /source /p /subsection - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354469 - /jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh
Author: jfclere Date: Tue Dec 6 08:46:59 2005 New Revision: 354469 URL: http://svn.apache.org/viewcvs?rev=354469view=rev Log: Add support for kaffe. Modified: jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh Modified: jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh?rev=354469r1=354468r2=354469view=diff == --- jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh (original) +++ jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh Tue Dec 6 08:46:59 2005 @@ -19,16 +19,39 @@ # # Adapt the following lines to your configuration JAVA_HOME=`echo $JAVA_HOME` +#JAVA_HOME=/opt/java +#JAVA_HOME=/opt/kaffe DAEMON_HOME=`(cd ../..; pwd)` TOMCAT_USER=`echo $USER` CLASSPATH=\ $DAEMON_HOME/dist/commons-daemon.jar:\ $DAEMON_HOME/dist/SimpleDaemon.jar -$DAEMON_HOME/src/native/unix/jsvc \ +PATH=$PATH:$DAEMON_HOME/src/native/unix +export PATH + +# library could be used to test restart after a core. +#-Dnative.library=${DAEMON_HOME}/src/samples/Native.so \ + +# options below are for kaffe. +#-Xclasspath/a:$CLASSPATH \ +#(to debug the class loader +#-vmdebug VMCLASSLOADER \ + +# option below is for the sun JVM. +#-cp $CLASSPATH \ + +if [ -f $JAVA_HOME/bin/kaffe ] +then + CLOPT=-Xclasspath/a:$CLASSPATH +else + CLOPT=-cp $CLASSPATH +fi + +jsvc \ -user $TOMCAT_USER \ -home $JAVA_HOME \ --cp $CLASSPATH \ +$CLOPT \ -pidfile ./pidfile \ -wait 90 \ -debug \ @@ -37,7 +60,7 @@ -Dnative.library=${DAEMON_HOME}/src/samples/Native.so \ SimpleDaemon \ # -# To get a verbose JVM +# To get a verbose JVM (sun JVM for example) #-verbose \ # To get a debug of jsvc. #-debug \ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354472 - in /jakarta/commons/proper/daemon/trunk/src/native/unix: native/arguments.c native/java.c native/jsvc-unix.c native/location.c support/apjava.m4 support/apsupport.m4
Author: jfclere Date: Tue Dec 6 08:48:47 2005 New Revision: 354472 URL: http://svn.apache.org/viewcvs?rev=354472view=rev Log: Add support for kaffe. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c?rev=354472r1=354471r2=354472view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c Tue Dec 6 08:48:47 2005 @@ -165,6 +165,16 @@ } else if (strstr(argv[x],-verbose)==argv[x]) { args-opts[args-onum++]=strdup(argv[x]); +#ifdef HAVE_KAFFEVM +} else if (strstr(argv[x],-vmdebug)==argv[x]) { +args-opts[args-onum++]=strdup(argv[x]); +temp=optional(argc,argv,x++); +if (temp==NULL) { +log_error(vmdebug option requires a debug flag.); +return(NULL); +} +args-opts[args-onum++]=strdup(temp); +#endif } else if (strcmp(argv[x],-D)==0) { log_error(Parameter -D must be followed by name=value); return(NULL); Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c?rev=354472r1=354471r2=354472view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c Tue Dec 6 08:48:47 2005 @@ -114,7 +114,7 @@ } /* Load the JVM library */ -#ifdef OSD_POSIX +#if defined(OSD_POSIX) || defined(HAVE_KAFFEVM) #else libh=dso_link(libf); if (libh==NULL) { @@ -151,7 +151,8 @@ } log_debug(Shell library %s loaded,appf); #endif /* ifdef OS_DARWIN */ -#ifdef OSD_POSIX +#if defined(OSD_POSIX) || defined(HAVE_KAFFEVM) +/* BS2000 and kaffe does not allow to call JNI_CreateJavaVM indirectly */ #else symb=dso_symbol(libh,JNI_CreateJavaVM); if (symb==NULL) { @@ -179,7 +180,13 @@ #else arg.version=JNI_VERSION_1_2; #endif -#ifdef OSD_POSIX_JFC +#if defined(OSD_POSIX) || defined(HAVE_KAFFEVM) + +#if defined(HAVE_KAFFEVM) +memset(arg, 0, sizeof(arg)); +arg.version = JNI_VERSION_1_4; +#endif + if (JNI_GetDefaultJavaVMInitArgs(arg)0) { log_error(Cannot init default JVM default args); return(false); @@ -217,7 +224,7 @@ } /* And finally create the Java VM */ -#ifdef OSD_POSIX +#if defined(OSD_POSIX) || defined(HAVE_KAFFEVM) ret=JNI_CreateJavaVM(jvm, env, arg); #else ret=(*symb)(jvm, env, arg); Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=354472r1=354471r2=354472view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Tue Dec 6 08:48:47 2005 @@ -533,7 +533,7 @@ log_debug(Waiting for a signal to be delivered); create_tmp_file(args); while (!stopping) { -#ifdef OSD_POSIX +#if defined(OSD_POSIX) || defined(HAVE_KAFFEVM) java_sleep(60); /* pause(); */ #else Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c?rev=354472r1=354471r2=354472view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c Tue Dec 6 08:48:47 2005 @@ -72,6 +72,9 @@ #if defined(HAVE_SABLEVM) $JAVA_HOME/lib/libsablevm.so,/* sableVM */ #endif +#if defined(HAVE_KAFFEVM) + $JAVA_HOME/jre/lib/ CPU /libkaffevm.so,/* kaffe */ +#endif $JAVA_HOME/jre/lib/ CPU /classic/libjvm.so, /* Sun JDK 1.2 */ $JAVA_HOME/jre/lib/ CPU /client/libjvm.so, /* Sun JDK 1.3 */ $JAVA_HOME/jre/lib/ CPU /libjvm.so, /* Sun JDK */ Modified
svn commit: r354476 - /jakarta/commons/proper/daemon/trunk/project.xml
Author: jfclere Date: Tue Dec 6 09:09:31 2005 New Revision: 354476 URL: http://svn.apache.org/viewcvs?rev=354476view=rev Log: Reflex the fact that I am not more an FSC employee. Modified: jakarta/commons/proper/daemon/trunk/project.xml Modified: jakarta/commons/proper/daemon/trunk/project.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/project.xml?rev=354476r1=354475r2=354476view=diff == --- jakarta/commons/proper/daemon/trunk/project.xml (original) +++ jakarta/commons/proper/daemon/trunk/project.xml Tue Dec 6 09:09:31 2005 @@ -72,8 +72,8 @@ developer nameJean-Frederic Clere/name idjfclere/id - email[EMAIL PROTECTED]/email - organizationFSC/organization + email[EMAIL PROTECTED]/email + organizationApache/organization /developer developer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354492 - /jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4
Author: jfclere Date: Tue Dec 6 10:43:11 2005 New Revision: 354492 URL: http://svn.apache.org/viewcvs?rev=354492view=rev Log: Fix PR 36031. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4?rev=354492r1=354491r2=354492view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 Tue Dec 6 10:43:11 2005 @@ -102,6 +102,18 @@ CFLAGS=$CFLAGS -DCPU=\\\PA_RISC2.0\\\ supported_os=hp-ux HOST_CPU=PA_RISC2.0;; + mipsel) +CFLAGS=$CFLAGS -DCPU=\\\mipsel\\\ +supported_os=mipsel +HOST_CPU=mipsel;; + ia64) +CFLAGS=$CFLAGS -DCPU=\\\ia64\\\ +supported_os=ia64 +HOST_CPU=ia64;; + s390) +CFLAGS=$CFLAGS -DCPU=\\\s390\\\ +supported_os=s390 +HOST_CPU=s390;; *) AC_MSG_RESULT([failed]) AC_MSG_ERROR([Unsupported CPU architecture $host_cpu]);; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354524 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Tue Dec 6 11:47:38 2005 New Revision: 354524 URL: http://svn.apache.org/viewcvs?rev=354524view=rev Log: Fix 36058. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=354524r1=354523r2=354524view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Tue Dec 6 11:47:38 2005 @@ -35,6 +35,8 @@ extern char **environ; +static mode_t envmask; /* mask to create the files */ + pid_t controlled=0; /* the son process pid */ static bool stopping=false; static bool doreload=false; @@ -519,6 +521,7 @@ #endif /* Start the service */ +umask(envmask); if (java_start()!=true) { log_debug(java_start failed); return(5); @@ -709,6 +712,7 @@ #endif } +envmask = umask(0077); set_output(args-outfile, args-errfile); /* We have to fork: this process will become the controller and the other - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354526 - /jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt
Author: jfclere Date: Tue Dec 6 11:51:51 2005 New Revision: 354526 URL: http://svn.apache.org/viewcvs?rev=354526view=rev Log: Add the PR fixed today. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt?rev=354526r1=354525r2=354526view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Tue Dec 6 11:51:51 2005 @@ -21,3 +21,7 @@ * fix 35318. * fix 35340. * fix 36030. (using /proc/self/exe and readlink). + * fix 35403. + * fix 35659. + * fix 36031. + * fix 36058. (mask used for pid/log and load: 0077). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354577 - /jakarta/commons/proper/daemon/trunk/xdocs/navigation.xml
Author: jfclere Date: Tue Dec 6 13:47:00 2005 New Revision: 354577 URL: http://svn.apache.org/viewcvs?rev=354577view=rev Log: Otherwise maven does not find it. Modified: jakarta/commons/proper/daemon/trunk/xdocs/navigation.xml Modified: jakarta/commons/proper/daemon/trunk/xdocs/navigation.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/xdocs/navigation.xml?rev=354577r1=354576r2=354577view=diff == --- jakarta/commons/proper/daemon/trunk/xdocs/navigation.xml (original) +++ jakarta/commons/proper/daemon/trunk/xdocs/navigation.xml Tue Dec 6 13:47:00 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=ISO-8859-1? -!DOCTYPE org.apache.commons.menus SYSTEM '../../commons-build/menus/menus.dtd' +!DOCTYPE org.apache.commons.menus SYSTEM '../commons-build/menus/menus.dtd' project name=Daemon titleDaemon/title - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r292258 - /jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4
Author: jfclere Date: Wed Sep 28 12:01:42 2005 New Revision: 292258 URL: http://svn.apache.org/viewcvs?rev=292258view=rev Log: Arrange the logic for handling sablevm. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4?rev=292258r1=292257r2=292258view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 Wed Sep 28 12:01:42 2005 @@ -35,14 +35,14 @@ ]) ]) -dnl AC_PATH_PROG does not work (it checks first PATH then our parameter). -dnl so we do 2 checks. +dnl Check for JAVA compilers. AC_DEFUN([AP_PROG_JAVAC],[ - AC_PATH_PROG(JAVAC,javac,NONE,$JAVA_HOME/bin) - if test $JAVAC = NONE + if test $SABLEVM != NONE then -AC_PATH_PROG(JAVAC_PATH,javac,NONE,$PATH) -JAVAC=$JAVAC_PATH +AC_PATH_PROG(JAVAC,javac-sablevm,NONE,$JAVA_HOME/bin) + else +XPATH=$JAVA_HOME/bin:$PATH +AC_PATH_PROG(JAVAC,javac,NONE,$XPATH) fi if test $JAVAC = NONE then @@ -54,12 +54,14 @@ AC_SUBST(JAVACFLAGS) ]) +dnl Check for jar archivers. AC_DEFUN([AP_PROG_JAR],[ - AC_PATH_PROG(JAR,jar,NONE,$JAVA_HOME/bin) - if test $JAR = NONE + if test $SABLEVM != NONE then -AC_PATH_PROG(JAR_PATH,jar,NONE,$PATH) -JAR=$JAR_PATH +AC_PATH_PROG(JAR,jar-sablevm,NONE,$JAVA_HOME/bin) + else +XPATH=$JAVA_HOME/bin:$PATH +AC_PATH_PROG(JAR,jar,NONE,$XPATH) fi if test $JAR = NONE then @@ -93,8 +95,6 @@ AC_DEFUN([AP_SABLEVM],[ if test x$JAVA_HOME != x then -AC_PATH_PROG(JAVAC,javac-sablevm,NONE,$JAVA_HOME/bin) -AC_PATH_PROG(JAR,jar-sablevm,NONE,$JAVA_HOME/bin) AC_PATH_PROG(SABLEVM,sablevm,NONE,$JAVA_HOME/bin) if test $SABLEVM != NONE then - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r292274 - in /jakarta/commons/proper/daemon/trunk/src/native/unix: configure.in support/apjava.m4
Author: jfclere Date: Wed Sep 28 12:26:12 2005 New Revision: 292274 URL: http://svn.apache.org/viewcvs?rev=292274view=rev Log: Add detection of kaffe. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in?rev=292274r1=292273r2=292274view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in Wed Sep 28 12:26:12 2005 @@ -76,6 +76,7 @@ AP_MSG_HEADER([Java compilation tools]) AP_JAVA() AP_SABLEVM() +AP_KAFFE() AP_PROG_JAVAC() AP_PROG_JAR() if test $supported_os != darwin Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4?rev=292274r1=292273r2=292274view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 Wed Sep 28 12:26:12 2005 @@ -103,3 +103,17 @@ fi fi ]) + +dnl check if the JVM in JAVA_HOME is kaffe +dnl $JAVA_HOME/bin/kaffe is tested. +AC_DEFUN([AP_KAFFE],[ + if test x$JAVA_HOME != x + then +AC_PATH_PROG(KAFFEVM,kaffe,NONE,$JAVA_HOME/bin) +if test $KAFFEVM != NONE +then + AC_MSG_RESULT([Using kaffe: $KAFFEVM]) + CFLAGS=$CFLAGS -DHAVE_KAFFEVM +fi + fi +]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r292037 - in /jakarta/commons/proper/daemon/trunk/src/native/unix/native: java.c jsvc-unix.c
Author: jfclere Date: Tue Sep 27 13:47:08 2005 New Revision: 292037 URL: http://svn.apache.org/viewcvs?rev=292037view=rev Log: Add traces. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c?rev=292037r1=292036r2=292037view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c Tue Sep 27 13:47:08 2005 @@ -343,6 +343,7 @@ return(false); } +log_debug(Daemon loading...); ret=(*env)-CallStaticBooleanMethod(env,cls,method,className,stringArray); if (ret==FALSE) { log_error(Cannot load daemon); Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=292037r1=292036r2=292037view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Tue Sep 27 13:47:08 2005 @@ -480,7 +480,11 @@ return(4); #endif /* Initialize the Java VM */ -if (java_init(args,data)!=true) return(1); +if (java_init(args,data)!=true) { +log_debug(java_init failed); +return(1); +} else +log_debug(java_init done); /* Check wether we need to dump the VM version */ if (args-vers==true) { @@ -497,7 +501,11 @@ } /* Load the service */ -if (java_load(args)!=true) return(3); +if (java_load(args)!=true) { +log_debug(java_load failed); +return(3); +} else +log_debug(java_load done); /* Downgrade user */ #ifdef OS_LINUX @@ -511,7 +519,11 @@ #endif /* Start the service */ -if (java_start()!=true) return(5); +if (java_start()!=true) { +log_debug(java_start failed); +return(5); +} else +log_debug(java_start done); /* Install signal handlers */ handler_hup=signal_set(SIGHUP,handler); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r234007 - in /jakarta/commons/proper/daemon/trunk/src/native/unix/native: java.c jsvc-unix.c
Author: jfclere Date: Sat Aug 20 01:21:58 2005 New Revision: 234007 URL: http://svn.apache.org/viewcvs?rev=234007view=rev Log: prevent core when libjvm.so is not found in linux. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c?rev=234007r1=234006r2=234007view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c Sat Aug 20 01:21:58 2005 @@ -56,7 +56,7 @@ /* Did we find ANY virtual machine? */ if (data-jnum==0) { log_error(Cannot find any VM in Java Home %s,data-path); -return(false); +return(NULL); } /* Select the VM */ Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=234007r1=234006r2=234007view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Sat Aug 20 01:21:58 2005 @@ -638,21 +638,28 @@ char *p1=NULL; char *p2=NULL; -p1=strdup(libf); -tmp=strrchr(p1,'/'); -if (tmp!=NULL) tmp[0]='\0'; +/* + * There is no need to change LD_LIBRARY_PATH + * if we were not able to find a path to libjvm.so + * (additionaly a strdup(NULL) cores dump on my machine). + */ +if (libf!=NULL) { +p1=strdup(libf); +tmp=strrchr(p1,'/'); +if (tmp!=NULL) tmp[0]='\0'; -p2=strdup(p1); -tmp=strrchr(p2,'/'); -if (tmp!=NULL) tmp[0]='\0'; +p2=strdup(p1); +tmp=strrchr(p2,'/'); +if (tmp!=NULL) tmp[0]='\0'; -if (oldpath==NULL) snprintf(buf,2048,%s:%s,p1,p2); -else snprintf(buf,2048,%s:%s:%s,oldpath,p1,p2); +if (oldpath==NULL) snprintf(buf,2048,%s:%s,p1,p2); +else snprintf(buf,2048,%s:%s:%s,oldpath,p1,p2); -tmp=strdup(buf); -setenv(LD_LIBRARY_PATH,tmp,1); +tmp=strdup(buf); +setenv(LD_LIBRARY_PATH,tmp,1); -log_debug(Invoking w/ LD_LIBRARY_PATH=%s,getenv(LD_LIBRARY_PATH)); +log_debug(Invoking w/ LD_LIBRARY_PATH=%s,getenv(LD_LIBRARY_PATH)); +} /* execve needs a full path */ ret = readlink(/proc/self/exe,buf,sizeof(buf)-1); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r234022 - in /jakarta/commons/proper/daemon/trunk/src/native/unix: configure.in native/java.c native/location.c support/apjava.m4
Author: jfclere Date: Sat Aug 20 04:55:19 2005 New Revision: 234022 URL: http://svn.apache.org/viewcvs?rev=234022view=rev Log: Add support for the sableVM (tested with 1.12 + patch PR 154) See http://sablevm.org/bugs/attachment.cgi?bugid=154action=viewall Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in?rev=234022r1=234021r2=234022view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in Sat Aug 20 04:55:19 2005 @@ -75,6 +75,7 @@ dnl - AP_MSG_HEADER([Java compilation tools]) AP_JAVA() +AP_SABLEVM() AP_PROG_JAVAC() AP_PROG_JAR() if test $supported_os != darwin Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c?rev=234022r1=234021r2=234022view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c Sat Aug 20 04:55:19 2005 @@ -237,6 +237,9 @@ } log_debug(Class %s found,loaderclass); +#if defined(HAVE_SABLEVM) +log_debug(sableVM doesn't support RegisterNatives); +#else jsvc_xlate_to_ascii(shutdownclass); nativemethod.name=shutdownclass; jsvc_xlate_to_ascii(shutdownparams); @@ -247,6 +250,7 @@ return(false); } log_debug(Native methods registered); +#endif return(true); } Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c?rev=234022r1=234021r2=234022view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c Sat Aug 20 04:55:19 2005 @@ -69,6 +69,9 @@ $JAVA_HOME/jre/bin/classic/jvm.dll, /* Sun JDK 1.3 */ $JAVA_HOME/jre/bin/client/jvm.dll,/* Sun JDK 1.4 */ #elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_BSD) || defined(OS_SYSV) || defined(OS_FREEBSD) || defined(OS_TRU64) +#if defined(HAVE_SABLEVM) + $JAVA_HOME/lib/libsablevm.so,/* sableVM */ +#endif $JAVA_HOME/jre/lib/ CPU /classic/libjvm.so, /* Sun JDK 1.2 */ $JAVA_HOME/jre/lib/ CPU /client/libjvm.so, /* Sun JDK 1.3 */ $JAVA_HOME/jre/lib/ CPU /libjvm.so, /* Sun JDK */ Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4?rev=234022r1=234021r2=234022view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 Sat Aug 20 04:55:19 2005 @@ -16,7 +16,7 @@ dnl - dnl Author Pier Fumagalli mailto:[EMAIL PROTECTED] -dnl Version $Id: apjava.m4,v 1.3 2004/02/27 08:40:46 jfclere Exp $ +dnl Version $Id$ dnl - AC_DEFUN([AP_PROG_JAVAC_WORKS],[ @@ -85,5 +85,21 @@ if test x$JAVA_HOME = x then AC_MSG_ERROR([Java Home not defined. Rerun with --with-java=[...] parameter]) + fi +]) + +dnl check if the JVM in JAVA_HOME is sableVM +dnl $JAVA_HOME/bin/sablevm and /opt/java/lib/sablevm/bin are tested. +AC_DEFUN([AP_SABLEVM],[ + if test x$JAVA_HOME != x + then +AC_PATH_PROG(JAVAC,javac-sablevm,NONE,$JAVA_HOME/bin) +AC_PATH_PROG(JAR,jar-sablevm,NONE,$JAVA_HOME/bin) +AC_PATH_PROG(SABLEVM,sablevm,NONE,$JAVA_HOME/bin) +if test $SABLEVM != NONE +then + AC_MSG_RESULT([Using sableVM: $SABLEVM]) + CFLAGS=$CFLAGS -DHAVE_SABLEVM +fi fi ]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r232775 - in /jakarta/commons/proper/daemon/trunk/src/native/unix/native: arguments.c help.c
Author: jfclere Date: Mon Aug 15 01:50:17 2005 New Revision: 232775 URL: http://svn.apache.org/viewcvs?rev=232775view=rev Log: Fix PR 36051. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c?rev=232775r1=232774r2=232775view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c Mon Aug 15 01:50:17 2005 @@ -162,7 +162,7 @@ log_error(Invalid Error File specified); return(NULL); } -}else if (strstr(argv[x],-verbose)==argv[x]) { +} else if (strstr(argv[x],-verbose)==argv[x]) { args-opts[args-onum++]=strdup(argv[x]); } else if (strcmp(argv[x],-D)==0) { @@ -186,16 +186,17 @@ } else if (strstr(argv[x],-ea)==argv[x]) { args-opts[args-onum++]=strdup(argv[x]); -} else if (strstr(argv[x],-)==argv[x]) { -log_error(Invalid option %s,argv[x]); -return(NULL); - } else if (strcmp(argv[x],-procname) == 0) { args-procname = optional(argc, argv, x++); -if(args-procname == NULL) { +if( args-procname == NULL) { log_error(Invalid process name specified); return (NULL); } + +} else if (strstr(argv[x],-)==argv[x]) { +log_error(Invalid option %s,argv[x]); +return(NULL); + } else { args-clas=strdup(argv[x]); break; Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c?rev=232775r1=232774r2=232775view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c Mon Aug 15 01:50:17 2005 @@ -79,6 +79,9 @@ printf(-Xoption\n); printf(set Virtual Machine specific option\n); +printf(-procname procname\n); +printf(use the specified process name (works only for Linux)\n); + printf(-wait waittime\n); printf(wait waittime seconds for the service to start\n); printf(waittime should multiple of 10 (min=10)\n); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r232790 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Mon Aug 15 03:48:56 2005 New Revision: 232790 URL: http://svn.apache.org/viewcvs?rev=232790view=rev Log: Just add a comment. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=232790r1=232789r2=232790view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Mon Aug 15 03:48:56 2005 @@ -707,6 +707,7 @@ unlink(args-pidf); /* If the child got out with 123 he wants to be restarted */ +/* See java_abort123 (we use this return code to restart when the JVM aborts) */ if (status==123) { log_debug(Reloading service); continue; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r232794 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Mon Aug 15 04:19:48 2005 New Revision: 232794 URL: http://svn.apache.org/viewcvs?rev=232794view=rev Log: Fix 35017 (wait 60 seconds before restarting!). Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=232794r1=232793r2=232794view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Mon Aug 15 04:19:48 2005 @@ -31,6 +31,7 @@ #define _LINUX_FS_H #include linux/capability.h #endif +#include time.h extern char **environ; @@ -600,6 +601,7 @@ pid_t pid=0; uid_t uid=0; gid_t gid=0; +time_t laststart; /* Parse command line arguments */ args=arguments(argc,argv); @@ -685,6 +687,7 @@ while ((pid=fork())!=-1) { /* We forked (again), if this is the child, we go on normally */ if (pid==0) exit(child(args,data,uid,gid)); +laststart = time(NULL); /* We are in the controller, we have to forward all interesting signals to the child, and wait for it to die */ @@ -710,6 +713,11 @@ /* See java_abort123 (we use this return code to restart when the JVM aborts) */ if (status==123) { log_debug(Reloading service); +/* prevent looping */ +if (laststart+60time(NULL)) { + log_debug(Waiting 60 s to prevent looping); + sleep(60); +} continue; } /* If the child got out with 0 he is shutting down */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r232795 - /jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c
Author: jfclere Date: Mon Aug 15 04:27:15 2005 New Revision: 232795 URL: http://svn.apache.org/viewcvs?rev=232795view=rev Log: Fix 35188 (typos in messages and comments). Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c?rev=232795r1=232794r2=232795view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c Mon Aug 15 04:27:15 2005 @@ -331,7 +331,7 @@ } } -/* Debuging functions */ +/* Debugging functions */ static void printUsage(LPAPXCMDLINE lpCmdline) { #ifdef _DEBUG @@ -1007,7 +1007,7 @@ return rv; } -/* Service controll handler +/* Service control handler */ void WINAPI service_ctrl_handler(DWORD dwCtrlCode) { @@ -1166,7 +1166,7 @@ /* Service is started */ DWORD rv; reportServiceStatus(SERVICE_RUNNING, NO_ERROR, 0); -apxLogWrite(APXLOG_MARK_DEBUG Waitning worker to finish...); +apxLogWrite(APXLOG_MARK_DEBUG Waiting worker to finish...); /* Set console handler to capture CTRL events */ SetConsoleCtrlHandler((PHANDLER_ROUTINE)console_handler, TRUE); @@ -1203,7 +1203,7 @@ _service_mode = FALSE; _service_name = lpCmdline-szApplication; -apxLogWrite(APXLOG_MARK_INFO Debuging Service...); +apxLogWrite(APXLOG_MARK_INFO Debugging Service...); serviceMain(0, NULL); apxLogWrite(APXLOG_MARK_INFO Debug service finished.); @@ -1287,7 +1287,7 @@ rv = 8; break; default: -/* Unknow command option */ +/* Unknown command option */ apxLogWrite(APXLOG_MARK_ERROR Unknown command line option); printUsage(lpCmdline); rv = 99; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r232797 - in /jakarta/commons/proper/daemon/trunk/src/native: nt/procrun/src/javajni.c unix/native/java.c
Author: jfclere Date: Mon Aug 15 04:33:58 2005 New Revision: 232797 URL: http://svn.apache.org/viewcvs?rev=232797view=rev Log: Fix PR 35318. Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/src/javajni.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/src/javajni.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/src/javajni.c?rev=232797r1=232796r2=232797view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/src/javajni.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/src/javajni.c Mon Aug 15 04:33:58 2005 @@ -339,7 +339,7 @@ } lpJava-iVersion = JNICALL_0(GetVersion); if (lpJava-iVersion JNI_VERSION_1_2) { -apxLogWrite(APXLOG_MARK_ERROR Unsuported JNI version %d, lpJava-iVersion); +apxLogWrite(APXLOG_MARK_ERROR Unsuported JNI version %#08x, lpJava-iVersion); return FALSE; } rv = TRUE; Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c?rev=232797r1=232796r2=232797view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c Mon Aug 15 04:33:58 2005 @@ -202,7 +202,7 @@ /* Do some debugging */ if (log_debug_flag==true) { log_debug(+-- DUMPING JAVA VM CREATION ARGUMENTS -); -log_debug(| Version: %x,arg.version); +log_debug(| Version: %#08x,arg.version); log_debug(| Ignore Unrecognized Arguments: %s, arg.ignoreUnrecognized==TRUE?True:False); log_debug(| Extra options: %d,arg.nOptions); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r232839 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Mon Aug 15 10:44:02 2005 New Revision: 232839 URL: http://svn.apache.org/viewcvs?rev=232839view=rev Log: fix 36030. Note that it requires /proc to be mounted. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=232839r1=232838r2=232839view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Mon Aug 15 10:44:02 2005 @@ -631,8 +631,9 @@ if (strcmp(argv[0],args-procname)!=0) { char *oldpath=getenv(LD_LIBRARY_PATH); char *libf=java_library(args,data); -char *old=argv[0]; +char *filename; char buf[2048]; +int ret; char *tmp=NULL; char *p1=NULL; char *p2=NULL; @@ -653,9 +654,18 @@ log_debug(Invoking w/ LD_LIBRARY_PATH=%s,getenv(LD_LIBRARY_PATH)); +/* execve needs a full path */ +ret = readlink(/proc/self/exe,buf,sizeof(buf)-1); +if (ret=0) + strcpy(buf,argv[0]); +else + buf[ret]='\0'; + +filename=buf; + argv[0]=args-procname; -execve(old,argv,environ); -log_error(Cannot execute JSVC executor process); +execve(filename,argv,environ); +log_error(Cannot execute JSVC executor process (%s),filename); return(1); } log_debug(Running w/ LD_LIBRARY_PATH=%s,getenv(LD_LIBRARY_PATH)); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r232843 - /jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt
Author: jfclere Date: Mon Aug 15 11:14:33 2005 New Revision: 232843 URL: http://svn.apache.org/viewcvs?rev=232843view=rev Log: The corrections I have done today ;-) Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt?rev=232843r1=232842r2=232843view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Mon Aug 15 11:14:33 2005 @@ -16,3 +16,8 @@ Changes with next-unreleased-yet version. * Add support for hp-ux. + * fix 35017. + * fix 36051. + * fix 35318. + * fix 35340. + * fix 36030. (using /proc/self/exe and readlink). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r232844 - /jakarta/commons/proper/daemon/trunk/src/native/nt/service/instmain.c
Author: jfclere Date: Mon Aug 15 11:16:16 2005 New Revision: 232844 URL: http://svn.apache.org/viewcvs?rev=232844view=rev Log: Fix 36050 (attachement 15913!). Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/service/instmain.c Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/service/instmain.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/nt/service/instmain.c?rev=232844r1=232843r2=232844view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/nt/service/instmain.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/nt/service/instmain.c Mon Aug 15 11:16:16 2005 @@ -182,7 +182,7 @@ /* open the service control manager with full access right */ hManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); if (NULL != hManager) { -/* create the service +/* create the service */ hService = CreateService(hManager, SZSERVICENAME, /* name of the service */ SZSERVICEDISPLAYNAME, /* description */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r232857 - /jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/src/javajni.c
Author: jfclere Date: Mon Aug 15 12:01:52 2005 New Revision: 232857 URL: http://svn.apache.org/viewcvs?rev=232857view=rev Log: typos in messsage (PR 35340). Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/src/javajni.c Modified: jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/src/javajni.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/src/javajni.c?rev=232857r1=232856r2=232857view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/src/javajni.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/nt/procrun/src/javajni.c Mon Aug 15 12:01:52 2005 @@ -339,7 +339,7 @@ } lpJava-iVersion = JNICALL_0(GetVersion); if (lpJava-iVersion JNI_VERSION_1_2) { -apxLogWrite(APXLOG_MARK_ERROR Unsuported JNI version %#08x, lpJava-iVersion); +apxLogWrite(APXLOG_MARK_ERROR Unsupported JNI version %#08x, lpJava-iVersion); return FALSE; } rv = TRUE; @@ -360,7 +360,7 @@ } /* we need at least 1.2 JNI */ if ((lpJava-iVersion = vmArgs11.version) JNI_VERSION_1_2) { -apxLogWrite(APXLOG_MARK_ERROR Unsuported JNI version %d, vmArgs11.version); +apxLogWrite(APXLOG_MARK_ERROR Unsupported JNI version %d, vmArgs11.version); return FALSE; } if (dwMs) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r179769 - in /jakarta/commons/proper/daemon/trunk/src/native/unix: native/location.c support/apsupport.m4
Author: jfclere Date: Fri Jun 3 04:05:12 2005 New Revision: 179769 URL: http://svn.apache.org/viewcvs?rev=179769view=rev Log: Add support for HP-UX. Submitted by Max Zinal (Zlat0 at mail dot ru). Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c?rev=179769r1=179768r2=179769view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c Fri Jun 3 04:05:12 2005 @@ -40,6 +40,9 @@ #elif defined(OS_TRU64) /usr/opt/java142, /usr/opt/java13, +#elif defined(OS_HPUX) +/opt/java1.4, +/opt/java1.3, #endif NULL, }; @@ -99,6 +102,11 @@ $JAVA_HOME/jre/lib/ CPU /fast32/libjvm.so, $JAVA_HOME/lib/ CPU /fast64/libjvm.so, $JAVA_HOME/lib/ CPU /fast32/libjvm.so, +#elif defined(OS_HPUX) +$JAVA_HOME/jre/lib/ CPU /server/libjvm.sl, +$JAVA_HOME/jre/lib/ CPU /client/libjvm.sl, +$JAVA_HOME/jre/lib/ CPU /hotspot/libjvm.sl, +$JAVA_HOME/jre/lib/ CPU /classic/libjvm.sl, #endif NULL, }; @@ -114,6 +122,9 @@ #elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_BSD) || defined(OS_FREEBSD) || defined(OS_TRU64) $JAVA_HOME/jre/lib/ CPU /$VM_NAME/libjvm.so,/* Sun JDK 1.3 */ $JAVA_HOME/lib/ CPU /$VM_NAME/libjvm.so,/* Sun JRE 1.3 */ +#elif defined(OS_HPUX) +$JAVA_HOME/jre/lib/ CPU /$VM_NAME/libjvm.sl, +$JAVA_HOME/lib/ CPU /$VM_NAME/libjvm.sl, #elif defined(OS_SYSV) $JAVA_HOME/jre/lib/ CPU /$VM_NAME/dce_threads/libjvm.so, $JAVA_HOME/jre/lib/ CPU /$VM_NAME/green_threads/libjvm.so, Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4?rev=179769r1=179768r2=179769view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 Fri Jun 3 04:05:12 2005 @@ -58,6 +58,10 @@ CFLAGS=$CFLAGS -pthread -DOS_TRU64 -DDSO_DLFCN -D_XOPEN_SOURCE_EXTENDED LDFLAGS=$LDFLAGS -pthread ;; + hpux11*) +CFLAGS=$CFLAGS -pthread -DOS_HPUX -DDSO_DLFCN +LDFLAGS=$LDFLAGS -pthread -lpthread +;; *) AC_MSG_RESULT([failed]) AC_MSG_ERROR([Unsupported operating system $host_os]) @@ -85,6 +89,14 @@ alpha*) CFLAGS=$CFLAGS -DCPU=\\\alpha\\\ supported_os=alpha +;; + hppa2.0w) +CFLAGS=$CFLAGS -DCPU=\\\PA_RISC2.0W\\\ +supported_os=hp-ux +;; + hppa2.0) +CFLAGS=$CFLAGS -DCPU=\\\PA_RISC2.0\\\ +supported_os=hp-ux ;; *) AC_MSG_RESULT([failed]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r179770 - /jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt
Author: jfclere Date: Fri Jun 3 04:07:22 2005 New Revision: 179770 URL: http://svn.apache.org/viewcvs?rev=179770view=rev Log: Add entry for the new changes. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt?rev=179770r1=179769r2=179770view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Fri Jun 3 04:07:22 2005 @@ -13,3 +13,6 @@ * -wait and -stop parameters. * fix 34851. * Don't break when set_caps() failed and the user is unchanged (linux). + +Changes with next-unreleased-yet version. + * Add support for hp-ux. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r170538 - /jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt
Author: jfclere Date: Tue May 17 01:03:57 2005 New Revision: 170538 URL: http://svn.apache.org/viewcvs?rev=170538view=rev Log: last minute correction. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt?rev=170538r1=170537r2=170538view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Tue May 17 01:03:57 2005 @@ -12,3 +12,4 @@ * Finish fixing 31613, automatic detection of JAVA_HOME and headers locations. * -wait and -stop parameters. * fix 34851. + * Don't break when set_caps() failed and the user is unchanged (linux). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r170562 - /jakarta/commons/proper/daemon/tags/daemon-1_0_1
Author: jfclere Date: Tue May 17 03:47:50 2005 New Revision: 170562 URL: http://svn.apache.org/viewcvs?rev=170562view=rev Log: release-1.0.1 Added: jakarta/commons/proper/daemon/tags/daemon-1_0_1/ - copied from r170561, jakarta/commons/proper/daemon/trunk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r170552 - /jakarta/commons/proper/daemon/trunk/RELEASE-NOTES.txt
Author: jfclere Date: Tue May 17 02:02:03 2005 New Revision: 170552 URL: http://svn.apache.org/viewcvs?rev=170552view=rev Log: Prepare the release. Modified: jakarta/commons/proper/daemon/trunk/RELEASE-NOTES.txt Modified: jakarta/commons/proper/daemon/trunk/RELEASE-NOTES.txt URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/RELEASE-NOTES.txt?rev=170552r1=170551r2=170552view=diff == --- jakarta/commons/proper/daemon/trunk/RELEASE-NOTES.txt (original) +++ jakarta/commons/proper/daemon/trunk/RELEASE-NOTES.txt Tue May 17 02:02:03 2005 @@ -1,7 +1,7 @@ $Id$ Commons Daemon Package - Version 1.0 + Version 1.0.1 Release Notes @@ -19,7 +19,13 @@ for Unix and Windows NT/2K/XP, which allows running a Java program as a native operating system daemon +* Add -wait and -stop parameters. (1.0.1). + The -wait parameter is experimental: that a is loop testing for a file in /tmp + and waiting n/10 seconds. + +* Allow to run as normal user for testing. (1.0.1). -BUG FIXES: +BUG FIXES: +1.0.1: 304310, 30177, 27523, 29465, 31614, 33580, 31613, 34851. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r170602 - /jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4
Author: jfclere Date: Tue May 17 07:11:21 2005 New Revision: 170602 URL: http://svn.apache.org/viewcvs?rev=170602view=rev Log: Allow any 4.x freebsd. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4?rev=170602r1=170601r2=170602view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 Tue May 17 07:11:21 2005 @@ -49,7 +49,7 @@ CFLAGS=$CFLAGS -DOS_SYSV -DDSO_DLFCN -Kthread LDFLAGS=-Kthread $LDFLAGS -ldl ;; - freebsd4.?) + freebsd*) CFLAGS=$CFLAGS -DOS_FREEBSD -DDSO_DLFCN -D_THREAD_SAFE -pthread LDFLAGS=-pthread $LDFLAGS supported_os=freebsd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r170560 - in /jakarta/commons/proper/daemon/trunk: README build.xml project.xml
Author: jfclere Date: Tue May 17 03:02:51 2005 New Revision: 170560 URL: http://svn.apache.org/viewcvs?rev=170560view=rev Log: use version 1.0.1 and people.apache.org instead jakarta.apache.org. Modified: jakarta/commons/proper/daemon/trunk/README jakarta/commons/proper/daemon/trunk/build.xml jakarta/commons/proper/daemon/trunk/project.xml Modified: jakarta/commons/proper/daemon/trunk/README URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/README?rev=170560r1=170559r2=170560view=diff == --- jakarta/commons/proper/daemon/trunk/README (original) +++ jakarta/commons/proper/daemon/trunk/README Tue May 17 03:02:51 2005 @@ -19,3 +19,7 @@ To build the documentation: maven site:generate (Do not forget to get ../commons-build: (cd ..; svn co http://svn.apache.org/repos/asf/jakarta/commons/proper/commons-build/trunk/ commons-build)) + +To deploy the documentation to apache site: +maven -Dmaven.username=${user.name} site:deploy +(Check siteAddress/ in project.xml). Modified: jakarta/commons/proper/daemon/trunk/build.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/build.xml?rev=170560r1=170559r2=170560view=diff == --- jakarta/commons/proper/daemon/trunk/build.xml (original) +++ jakarta/commons/proper/daemon/trunk/build.xml Tue May 17 03:02:51 2005 @@ -43,7 +43,7 @@ property name=component.title value=Java Daemons/ !-- The current version number of this component -- - property name=component.version value=1.0/ + property name=component.version value=1.0.1/ !-- The base directory for compilation targets -- property name=build.home value=target/ Modified: jakarta/commons/proper/daemon/trunk/project.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/project.xml?rev=170560r1=170559r2=170560view=diff == --- jakarta/commons/proper/daemon/trunk/project.xml (original) +++ jakarta/commons/proper/daemon/trunk/project.xml Tue May 17 03:02:51 2005 @@ -18,7 +18,7 @@ pomVersion3/pomVersion idcommons-daemon/id - currentVersion1.0/currentVersion + currentVersion1.0.1/currentVersion inceptionYear2003/inceptionYear nameDaemon/name shortDescriptionCommons Daemon/shortDescription @@ -43,7 +43,7 @@ gumpRepositoryIdjakarta/gumpRepositoryId issueTrackingUrlhttp://issues.apache.org/bugzilla//issueTrackingUrl - siteAddressjakarta.apache.org/siteAddress + siteAddresspeople.apache.org/siteAddress siteDirectory/www/jakarta.apache.org/commons/${pom.artifactId.substring(8)}//siteDirectory distributionDirectory/www/jakarta.apache.org/builds/jakarta-commons/${pom.artifactId.substring(8)}//distributionDirectory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r170551 - /jakarta/commons/proper/daemon/trunk/xdocs/jsvc.xml
Author: jfclere Date: Tue May 17 01:47:45 2005 New Revision: 170551 URL: http://svn.apache.org/viewcvs?rev=170551view=rev Log: Uprade the -help output. Modified: jakarta/commons/proper/daemon/trunk/xdocs/jsvc.xml Modified: jakarta/commons/proper/daemon/trunk/xdocs/jsvc.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/xdocs/jsvc.xml?rev=170551r1=170550r2=170551view=diff == --- jakarta/commons/proper/daemon/trunk/xdocs/jsvc.xml (original) +++ jakarta/commons/proper/daemon/trunk/xdocs/jsvc.xml Tue May 17 01:47:45 2005 @@ -90,7 +90,7 @@ -jvm lt;JVM namegt; use a specific Java Virtual Machine. Available JVMs: -'(null)' +'client' 'server' -cp / -classpath lt;directories and zip/jar filesgt; set search path for service classes and resouces -home lt;directorygt; @@ -107,7 +107,7 @@ verbosely print debugging information -check only check service (implies -nodetach) --user +-user lt;usergt; user used to run the daemon (defaults to current user) -verbose[:class|gc|jni] enable verbose output @@ -124,6 +124,11 @@ set a Java system property -Xlt;optiongt; set Virtual Machine specific option +-wait lt;waittimegt; +wait waittime seconds for the service to start +waittime should multiple of 10 (min=10) +-stop +stop the service using the file given in the -pidfile option /source /p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r170536 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Tue May 17 01:02:30 2005 New Revision: 170536 URL: http://svn.apache.org/viewcvs?rev=170536view=rev Log: Allow jsvc to start as normal user in linux. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=170536r1=170535r2=170536view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Tue May 17 01:02:30 2005 @@ -142,8 +142,13 @@ static int linuxset_user_group(char *user, int uid, int gid) { /* set capabilities enough for binding port 80 setuid/getuid */ -if (set_caps(CAPS)!=0) -return(-1); +if (set_caps(CAPS)!=0) { +if (getuid()!= uid) { +log_error(set_caps(CAPS) failed); +return(-1); +} +log_debug(set_caps(CAPS) failed); +} /* make sure they are kept after setuid */ if (prctl(PR_SET_KEEPCAPS,1,0,0,0) 0) { @@ -158,8 +163,13 @@ } /* set capability to binding port 80 read conf */ -if (set_caps(CAPSMIN)!=0) -return(-1); +if (set_caps(CAPSMIN)!=0) { +if (getuid()!= uid) { +log_error(set_caps(CAPSMIN) failed); +return(-1); +} +log_debug(set_caps(CAPSMIN) failed); +} return(0); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r170016 - in /jakarta/commons/proper/daemon/trunk/src/native/unix/man: README fetch.sh
Author: jfclere Date: Fri May 13 06:17:02 2005 New Revision: 170016 URL: http://svn.apache.org/viewcvs?rev=170016view=rev Log: Add explaination about how to build the manpage. Added: jakarta/commons/proper/daemon/trunk/src/native/unix/man/README jakarta/commons/proper/daemon/trunk/src/native/unix/man/fetch.sh Added: jakarta/commons/proper/daemon/trunk/src/native/unix/man/README URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/man/README?rev=170016view=auto == --- jakarta/commons/proper/daemon/trunk/src/native/unix/man/README (added) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/man/README Fri May 13 06:17:02 2005 @@ -0,0 +1,20 @@ +To build it use: +docbook2man jsvc.1.xml + +If your docbook2man uses xalan and you are behind a firewall +Modify jsvc.1.xml as below: +Index: jsvc.1.xml +=== +--- jsvc.1.xml (revision 170004) jsvc.1.xml (working copy) +@@ -1,6 +1,6 @@ + ?xml version=1.0 encoding=utf-8? + !DOCTYPE refentry PUBLIC -//OASIS//DTD DocBook XML V4.1.2//EN +- http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd; ++ docbookx.dtd + refentry id='jsvc1' + refmeta + refentrytitleJSVC/refentrytitle +Use fetch.sh to get docbook files. Added: jakarta/commons/proper/daemon/trunk/src/native/unix/man/fetch.sh URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/man/fetch.sh?rev=170016view=auto == --- jakarta/commons/proper/daemon/trunk/src/native/unix/man/fetch.sh (added) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/man/fetch.sh Fri May 13 06:17:02 2005 @@ -0,0 +1,21 @@ +mkdir -p ent +rm -f JSVC.1 +while true +do + FILE=`docbook2man jsvc.1.xml 21 | grep FileNotFoundException | awk -F FileNotFoundException: ' { print $2 } ' | awk ' { print $1 } '` + if [ -f JSVC.1 ] + then +break + fi + echo FILE: $FILE + file=`basename $FILE` + dir=`dirname $FILE` + man=`basename $dir` + echo file: $file dir: $dir man: $man + if [ $man = ent ] + then +(cd ent; wget http://www.oasis-open.org/docbook/xml/4.1.2/ent/$file) + else +wget http://www.oasis-open.org/docbook/xml/4.1.2/$file + fi +done - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r169598 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Wed May 11 01:01:33 2005 New Revision: 169598 URL: http://svn.apache.org/viewcvs?rev=169598view=rev Log: don't do check if starting (check intances the class). Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=169598r1=169597r2=169598view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Wed May 11 01:01:33 2005 @@ -479,8 +479,8 @@ } /* Do we have to do a check-only initialization? */ -if (java_check(args)!=true) return(2); -else if (args-chck==true) { +if (args-chck==true) { +if (java_check(args)!=true) return(2); printf(Service \%s\ checked successfully\n,args-clas); return(0); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r169610 - in /jakarta/commons/proper/daemon/trunk/src/native/unix/man: ./ jsvc.1.xml
Author: jfclere Date: Wed May 11 02:44:08 2005 New Revision: 169610 URL: http://svn.apache.org/viewcvs?rev=169610view=rev Log: Submitted by Arnaud Vandyck avdyk at debian dot org Added: jakarta/commons/proper/daemon/trunk/src/native/unix/man/ jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml Added: jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml?rev=169610view=auto == --- jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml (added) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml Wed May 11 02:44:08 2005 @@ -0,0 +1,156 @@ +?xml version=1.0 encoding=utf-8? +!DOCTYPE refentry PUBLIC -//OASIS//DTD DocBook XML V4.1.2//EN + http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd; +refentry id='jsvc1' + refmeta +refentrytitleJSVC/refentrytitle +manvolnum1/manvolnum +refmiscinfo class='date'October 2004/refmiscinfo +refmiscinfo class='source'Jsvc version 1.0/refmiscinfo +refmiscinfo class='manual'Jakarta project/refmiscinfo + /refmeta + refnamediv id='name' +refnamejsvc/refname +refpurposeapplication to launch java daemon/refpurpose + /refnamediv + !-- body begins here -- + refsynopsisdiv id='synopsis' +cmdsynopsis + commandjsvc/command + arg choice='opt'-jvm replaceableJVM name/replaceable/arg + arg choice='opt'-classpath replaceablepath/replaceable/arg + arg choice='opt'-cp replaceablepath/replaceable/arg + arg choice='opt'-home replaceabledirectory/replaceable/arg + arg choice='opt'-version/arg + arg choice='opt'-help/arg + arg choice='opt'-?/arg + arg choice='opt'-nodetach/arg + arg choice='opt'-debug/arg + arg choice='opt'-check/arg + arg choice='opt'-user/arg + arg choice='opt'-verbosereplaceable:class|gc|jni/replaceable/arg + arg choice='opt'-outfile replaceable/full/path/to/file/replaceable/arg + arg choice='opt'-errfile replaceable/full/path/to/file/replaceable/arg + arg choice='opt'-pidfile replaceable/full/path/to/file/replaceable/arg + arg choice='opt'-Dproperty=replaceablevalue/replaceable/arg + arg choice='opt'-Xreplaceableoption/replaceable/arg + !-- end of the new arguments -- +/cmdsynopsis + /refsynopsisdiv + refsect1 id=description +titleDESCRIPTION/title +paracommandjsvc/command executes emphasis remap=Iclassfile/emphasis +that implements a Daemon interface./para + /refsect1 + + refsect1 id=options +titleOPTIONS/title + +variablelist remap=TP + varlistentry +termoption-jvm/option JVM name/term +listitem + parause a specific Java Virtual Machine./para +/listitem + /varlistentry + varlistentry +termoption-cp/ -classpath/option directory and zip/jar + files/term +listitem + paraset search path for service classes and resouces/para +/listitem + /varlistentry + varlistentry +termoption-home/option directory/term +listitem + paraset the path of your JDK or JRE installation (or set + the JAVA_HOME environment variable) + /para +/listitem + /varlistentry + varlistentry +termoption-version/option/term +listitem + parashow the current Java environment version (to check + correctness of -home and -jvm. Implies -nodetach)/para +/listitem + /varlistentry + varlistentry +termoption-help/option/term +listitem + parashow this help page (implies -nodetach)/para +/listitem + /varlistentry + varlistentry +termoption-nodetach/option/term +listitem + paradon't detach from parent process and become a daemon/para +/listitem + /varlistentry + varlistentry +termoption-debug/option/term +listitem + paraverbosely print debugging information/para +/listitem + /varlistentry + varlistentry +termoption-check/option/term +listitem + paraonly check service (implies -nodetach)/para +/listitem + /varlistentry + varlistentry +termoption-user/option/term +listitem + parauser used to run the daemon (defaults to current user)/para +/listitem + /varlistentry + varlistentry +termoption-verbose[:class|gc|jni]/option/term +listitem + paraenable verbose output/para +/listitem + /varlistentry + varlistentry +termoption-outfile/option /full/path/to/file/term +listitem + paraLocation for output from stdout (defaults to /dev/null). Use
svn commit: r169613 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c
Author: jfclere Date: Wed May 11 02:52:00 2005 New Revision: 169613 URL: http://svn.apache.org/viewcvs?rev=169613view=rev Log: -user needs a parameter. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c?rev=169613r1=169612r2=169613view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c Wed May 11 02:52:00 2005 @@ -55,7 +55,7 @@ printf(-check\n); printf(only check service (implies -nodetach)\n); -printf(-user\n); +printf(-user user\n); printf(user used to run the daemon (defaults to current user)\n); printf(-verbose[:class|gc|jni]\n); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r169616 - /jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml
Author: jfclere Date: Wed May 11 03:04:10 2005 New Revision: 169616 URL: http://svn.apache.org/viewcvs?rev=169616view=rev Log: add the new option wait and stop. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml?rev=169616r1=169615r2=169616view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml Wed May 11 03:04:10 2005 @@ -5,8 +5,8 @@ refmeta refentrytitleJSVC/refentrytitle manvolnum1/manvolnum -refmiscinfo class='date'October 2004/refmiscinfo -refmiscinfo class='source'Jsvc version 1.0/refmiscinfo +refmiscinfo class='date'May 2005/refmiscinfo +refmiscinfo class='source'Jsvc version 1.0.1/refmiscinfo refmiscinfo class='manual'Jakarta project/refmiscinfo /refmeta refnamediv id='name' @@ -27,7 +27,9 @@ arg choice='opt'-nodetach/arg arg choice='opt'-debug/arg arg choice='opt'-check/arg - arg choice='opt'-user/arg + arg choice='opt'-user replaceableuser/replaceable/arg + arg choice='opt'-wait replaceablewaittime/replaceable/arg + arg choice='opt'-stop/arg arg choice='opt'-verbosereplaceable:class|gc|jni/replaceable/arg arg choice='opt'-outfile replaceable/full/path/to/file/replaceable/arg arg choice='opt'-errfile replaceable/full/path/to/file/replaceable/arg @@ -100,7 +102,21 @@ /listitem /varlistentry varlistentry -termoption-user/option/term +termoption-stop/option/term +listitem + parastop the service using the file given in the -pidfile option/para +/listitem + /varlistentry + varlistentry +termoption-wait/option waittime/term +listitem + parawait up to waittime seconds for the service to start + waittime should multiple of 10 (min=10) + /para +/listitem + /varlistentry + varlistentry +termoption-user/option user/term listitem parauser used to run the daemon (defaults to current user)/para /listitem - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r169617 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh
Author: jfclere Date: Wed May 11 03:31:27 2005 New Revision: 169617 URL: http://svn.apache.org/viewcvs?rev=169617view=rev Log: Add pidfile and catalina.base to fix 33581. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh?rev=169617r1=169616r2=169617view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh Wed May 11 03:31:27 2005 @@ -33,7 +33,11 @@ CATALINA_HOME=/home/tomcat5/tomcat5/jakarta-tomcat-5/build DAEMON_HOME=/home/jfclere/daemon TOMCAT_USER=tomcat5 + +# for multi instances adapt those lines. TMP_DIR=/var/tmp +PID_FILE=/var/run/jsvc.pid +CATALINA_BASE=/home/tomcat5/tomcat5/jakarta-tomcat-5/build CATALINA_OPTS=-Djava.library.path=/home/jfclere/jakarta-tomcat-connectors/jni/native/.libs CLASSPATH=\ @@ -50,8 +54,10 @@ -user $TOMCAT_USER \ -home $JAVA_HOME \ -Dcatalina.home=$CATALINA_HOME \ +-Dcatalina.base=$CATALINA_BASE \ -Djava.io.tmpdir=$TMP_DIR \ -wait 10 \ +-pidfile $PID_FILE \ -outfile $CATALINA_HOME/logs/catalina.out \ -errfile '1' \ $CATALINA_OPTS \ @@ -71,6 +77,7 @@ # $DAEMON_HOME/src/native/unix/jsvc \ -stop \ +-pidfile $PID_FILE \ org.apache.catalina.startup.Bootstrap exit $? ;; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r169620 - /jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt
Author: jfclere Date: Wed May 11 03:41:11 2005 New Revision: 169620 URL: http://svn.apache.org/viewcvs?rev=169620view=rev Log: Now ready for release. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt?rev=169620r1=169619r2=169620view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Wed May 11 03:41:11 2005 @@ -10,3 +10,5 @@ * Add support for JVM-4.1.x on MAC OS X (part of PR 31613). * Prevent starting jsvc several times with the same pidfile (PR 33580). * Finish fixing 31613, automatic detection of JAVA_HOME and headers locations. + * -wait and -stop parameters. + * fix 34851. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r169424 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Mon May 9 23:45:57 2005 New Revision: 169424 URL: http://svn.apache.org/viewcvs?rev=169424view=rev Log: When waittime/10 is bigger than 10 exchange waittime and count. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=169424r1=169423r2=169424view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Mon May 9 23:45:57 2005 @@ -374,6 +374,10 @@ int i, status, waittime; log_debug(wait_child %d, pid); waittime = args-wait/10; +if (waittime10) { +count = waittime; +waittime = 10; +} while (count0) { sleep(1); /* check if the controler is still running */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r169429 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c
Author: jfclere Date: Tue May 10 00:18:03 2005 New Revision: 169429 URL: http://svn.apache.org/viewcvs?rev=169429view=rev Log: Add help for the -wait and -stop options. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c?rev=169429r1=169428r2=169429view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/help.c Tue May 10 00:18:03 2005 @@ -79,5 +79,12 @@ printf(-Xoption\n); printf(set Virtual Machine specific option\n); +printf(-wait waittime\n); +printf(wait waittime seconds for the service to start\n); +printf(waittime should multiple of 10 (min=10)\n); + +printf(-stop\n); +printf(stop the service using the file given in the -pidfile option\n); + printf(\n); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r169326 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Mon May 9 08:14:56 2005 New Revision: 169326 URL: http://svn.apache.org/viewcvs?rev=169326view=rev Log: replace pause() by call of the java/lang/Thread.sleep(). Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c?rev=169326r1=169325r2=169326view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c Mon May 9 08:14:56 2005 @@ -271,7 +271,7 @@ jsvc_xlate_to_ascii(exitparams); method=(*env)-GetStaticMethodID(env,system,exitclass,exitparams); if (method==NULL) { -log_error(Cannot found \System.exit(int)\ entry point); +log_error(Cannot find \System.exit(int)\ entry point); return(false); } @@ -335,7 +335,7 @@ jsvc_xlate_to_ascii(loadparams); method=(*env)-GetStaticMethodID(env,cls,load,loadparams); if (method==NULL) { -log_error(Cannot found Daemon Loader \load\ entry point); +log_error(Cannot find Daemon Loader \load\ entry point); return(false); } @@ -360,7 +360,7 @@ jsvc_xlate_to_ascii(startparams); method=(*env)-GetStaticMethodID(env,cls,start,startparams); if (method==NULL) { -log_error(Cannot found Daemon Loader \start\ entry point); +log_error(Cannot find Daemon Loader \start\ entry point); return(false); } @@ -372,6 +372,34 @@ log_debug(Daemon started successfully); return(true); +} + +/* + * call the java sleep to prevent problems with threads + */ +void java_sleep(int wait) { +jclass clsThread; +jmethodID method; +char jsleep[]=sleep; +char jsleepparams[]=(J)V; +char jthread[]=java/lang/Thread; + +jsvc_xlate_to_ascii(jsleep); +jsvc_xlate_to_ascii(jsleepparams); +jsvc_xlate_to_ascii(jthread); + +clsThread = (*env)-FindClass(env,jthread); +if (clsThread==NULL) { +log_error(Cannot find java/lang/Thread class); +return; +} +method=(*env)-GetStaticMethodID(env,clsThread,jsleep,jsleepparams); +if (method==NULL) { +log_error(Cannot found the sleep entry point); +return; +} + +(*env)-CallStaticVoidMethod(env,clsThread,method,(jlong)wait*1000); } /* Call the stop method in our daemon loader */ Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=169326r1=169325r2=169326view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Mon May 9 08:14:56 2005 @@ -504,7 +504,8 @@ create_tmp_file(args); while (!stopping) { #ifdef OSD_POSIX -pause(); +java_sleep(60); +/* pause(); */ #else sleep(60); /* pause() not threadsafe */ #endif - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r169335 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Mon May 9 09:00:47 2005 New Revision: 169335 URL: http://svn.apache.org/viewcvs?rev=169335view=rev Log: Allow initgroups() to fail if we are already the user requested. (That is to allow testing without beeing root). Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=169335r1=169334r2=169335view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Mon May 9 09:00:47 2005 @@ -90,8 +90,11 @@ return(-1); } if (initgroups(user, gid)!=0) { -log_error(Cannot set supplement group list for user '%s',user); -return(-1); +if (getuid()!= uid) { +log_error(Cannot set supplement group list for user '%s',user); +return(-1); +} else +log_debug(Cannot set supplement group list for user '%s',user); } if (setuid(uid)!=0) { log_error(Cannot set user id for user '%s',user); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r165114 - /jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4
Author: jfclere Date: Thu Apr 28 01:03:15 2005 New Revision: 165114 URL: http://svn.apache.org/viewcvs?rev=165114view=rev Log: Exchange order of host_os and host_cpu (just for bs2. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4?rev=165114r1=165113r2=165114view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 Thu Apr 28 01:03:15 2005 @@ -21,33 +21,6 @@ AC_DEFUN(AP_SUPPORTED_HOST,[ AC_MSG_CHECKING([C flags dependant on host system type]) - case $host_cpu in - powerpc) -CFLAGS=$CFLAGS -DCPU=\\\$host_cpu\\\ ;; - sparc*) -CFLAGS=$CFLAGS -DCPU=\\\$host_cpu\\\ ;; - i?86) -CFLAGS=$CFLAGS -DCPU=\\\i386\\\ ;; - x86_64) -CFLAGS=$CFLAGS -DCPU=\\\amd64\\\ ;; - bs2000) -CFLAGS=$CFLAGS -DCPU=\\\osd\\\ -DCHARSET_EBCDIC -DOSD_POSIX -supported_os=osd -LDFLAGS=-Kno_link_stdlibs -B llm4 -l BLSLIB $LDFLAGS -LDCMD=cc -;; - mips) -CFLAGS=$CFLAGS -DCPU=\\\mips\\\ -supported_os=mips -;; - alpha*) -CFLAGS=$CFLAGS -DCPU=\\\alpha\\\ -supported_os=alpha -;; - *) -AC_MSG_RESULT([failed]) -AC_MSG_ERROR([Unsupported CPU architecture $host_cpu]);; - esac case $host_os in darwin*) @@ -90,6 +63,35 @@ AC_MSG_ERROR([Unsupported operating system $host_os]) ;; esac + case $host_cpu in + powerpc) +CFLAGS=$CFLAGS -DCPU=\\\$host_cpu\\\ ;; + sparc*) +CFLAGS=$CFLAGS -DCPU=\\\$host_cpu\\\ ;; + i?86) +CFLAGS=$CFLAGS -DCPU=\\\i386\\\ ;; + x86_64) +CFLAGS=$CFLAGS -DCPU=\\\amd64\\\ ;; + bs2000) +CFLAGS=$CFLAGS -DCPU=\\\osd\\\ -DCHARSET_EBCDIC -DOSD_POSIX +supported_os=osd +LDFLAGS=-Kno_link_stdlibs -B llm4 -l BLSLIB +LDCMD=/opt/C/bin/cc +;; + mips) +CFLAGS=$CFLAGS -DCPU=\\\mips\\\ +supported_os=mips +;; + alpha*) +CFLAGS=$CFLAGS -DCPU=\\\alpha\\\ +supported_os=alpha +;; + *) +AC_MSG_RESULT([failed]) +AC_MSG_ERROR([Unsupported CPU architecture $host_cpu]);; + esac + AC_MSG_RESULT([ok]) AC_SUBST(CFLAGS) + AC_SUBST(LDFLAGS) ]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r165119 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/debug.c
Author: jfclere Date: Thu Apr 28 02:00:08 2005 New Revision: 165119 URL: http://svn.apache.org/viewcvs?rev=165119view=rev Log: Add date, time and pid to the printed messages. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/debug.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/debug.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/debug.c?rev=165119r1=165118r2=165119view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/debug.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/debug.c Thu Apr 28 02:00:08 2005 @@ -15,6 +15,9 @@ */ /* @version $Id$ */ #include jsvc.h +#include sys/types.h +#include unistd.h +#include time.h /* Wether debug is enabled or not */ bool log_debug_flag = false; @@ -25,12 +28,19 @@ /* Dump a debug message to stderr */ void log_debug(const char *fmt, ...) { va_list ap; +time_t now; +struct tm *nowtm; +char buff[80]; if (log_debug_flag==false) return; if (fmt==NULL) return; +now = time(NULL); +nowtm = localtime(now); +strftime(buff, sizeof(buff), %d/%m/%Y %T, nowtm); + va_start(ap,fmt); -fprintf(stderr,%s debug: ,log_prog); +fprintf(stderr,%s %d %s debug: , buff, getpid(), log_prog); vfprintf(stderr,fmt,ap); fprintf(stderr,\n); fflush(stderr); @@ -40,11 +50,18 @@ /* Dump an error message to stderr */ void log_error(const char *fmt, ...) { va_list ap; +time_t now; +struct tm *nowtm; +char buff[80]; if (fmt==NULL) return; +now = time(NULL); +nowtm = localtime(now); +strftime(buff, sizeof(buff), %d/%m/%Y %T, nowtm); + va_start(ap,fmt); -fprintf(stderr,%s error: ,log_prog); +fprintf(stderr,%s %d %s error: , buff, getpid(), log_prog); vfprintf(stderr,fmt,ap); fprintf(stderr,\n); fflush(stderr); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r165124 - in /jakarta/commons/proper/daemon/trunk/src/native/unix/native: arguments.c arguments.h jsvc-unix.c
Author: jfclere Date: Thu Apr 28 02:36:02 2005 New Revision: 165124 URL: http://svn.apache.org/viewcvs?rev=165124view=rev Log: Allow to use a parameter value for the maximum waiting time. The minimum supported is 10, default behaviour is to return without waiting for the JVM to start. The value are rounded to by 10% of the value because the logic makes only 10 waiting loops. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.h jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c?rev=165124r1=165123r2=165124view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c Thu Apr 28 02:36:02 2005 @@ -43,7 +43,7 @@ args-help=false; /* Don't display help */ args-chck=false; /* Don't do a check-only startup */ args-stop=false; /* Stop a running jsvc */ -args-wait=false; /* Wait until jsvc has started the JVM */ +args-wait=0; /* Wait until jsvc has started the JVM */ args-install=false;/* Don't install as a service */ args-remove=false; /* Don't remove the installed service */ args-service=false;/* Don't run as a service */ @@ -116,7 +116,13 @@ log_debug_flag=true; } else if (strcmp(argv[x],-wait)==0) { -args-wait=true; +temp=optional(argc,argv,x++); +if (temp!=NULL) +args-wait=atoi(temp); +if (args-wait10) { +log_error(Invalid wait time specified (min=10)); +return(NULL); +} } else if (strcmp(argv[x],-stop)==0) { args-stop=true; @@ -256,7 +262,7 @@ log_debug(| Stop:%s,IsTrueFalse(args-stop)); -log_debug(| Wait:%s,IsTrueFalse(args-wait)); +log_debug(| Wait:%d,args-wait); log_debug(| Run as service: %s,IsYesNo(args-service)); Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.h URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.h?rev=165124r1=165123r2=165124view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.h (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.h Thu Apr 28 02:36:02 2005 @@ -53,8 +53,8 @@ bool chck; /** Stop running jsvc */ bool stop; -/** Wait until service started */ -bool wait; +/** number of seconds to until service started */ +int wait; /** Install as a service (win32) */ bool install; /** Remove when installed as a service (win32) */ Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=165124r1=165123r2=165124view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Thu Apr 28 02:36:02 2005 @@ -368,8 +368,9 @@ bool havejvm=false; int fd; char buff[80]; -int i, status; +int i, status, waittime; log_debug(wait_child %d, pid); +waittime = args-wait/10; while (count0) { sleep(1); /* check if the controler is still running */ @@ -406,10 +407,10 @@ } } } -sleep(5); +sleep(waittime); count--; } -return(1); /* It takes more than a minute to start, something must be wrong */ +return(1); /* It takes more than the wait time to start, something must be wrong */ } /* @@ -649,7 +650,7 @@ } /* If we're in the parent process */ if (pid!=0) { -if (args-wait==true) +if (args-wait=10) return(wait_child(args,pid)); else return(0); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r165125 - /jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh
Author: jfclere Date: Thu Apr 28 02:42:13 2005 New Revision: 165125 URL: http://svn.apache.org/viewcvs?rev=165125view=rev Log: add -wait 90 to show the new wait feature. Modified: jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh Modified: jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh?rev=165125r1=165124r2=165125view=diff == --- jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh (original) +++ jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh Thu Apr 28 02:42:13 2005 @@ -30,6 +30,8 @@ -home $JAVA_HOME \ -cp $CLASSPATH \ -pidfile ./pidfile \ +-wait 90 \ +-debug \ -outfile toto.txt \ -errfile '1' \ -Dnative.library=${DAEMON_HOME}/src/samples/Native.so \ @@ -39,3 +41,5 @@ #-verbose \ # To get a debug of jsvc. #-debug \ + +echo result: $? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r165127 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh
Author: jfclere Date: Thu Apr 28 03:43:43 2005 New Revision: 165127 URL: http://svn.apache.org/viewcvs?rev=165127view=rev Log: Add the waittime to the -wait parameter. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh?rev=165127r1=165126r2=165127view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh Thu Apr 28 03:43:43 2005 @@ -51,7 +51,7 @@ -home $JAVA_HOME \ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$TMP_DIR \ --wait \ +-wait 10 \ -outfile $CATALINA_HOME/logs/catalina.out \ -errfile '1' \ $CATALINA_OPTS \ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r165001 - /jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java
Author: jfclere Date: Wed Apr 27 09:01:42 2005 New Revision: 165001 URL: http://svn.apache.org/viewcvs?rev=165001view=rev Log: Make sure that ASCII is send to the client. Modified: jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java Modified: jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java?rev=165001r1=165000r2=165001view=diff == --- jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java (original) +++ jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java Wed Apr 27 09:01:42 2005 @@ -220,7 +220,12 @@ } public void handle(InputStream in, OutputStream os) { -PrintStream out=new PrintStream(os); +PrintStream out=null; +try { +out=new PrintStream(os, true, US-ASCII); +} catch (UnsupportedEncodingException ex) { +out=new PrintStream(os); +} while(true) { try { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r165006 - in /jakarta/commons/proper/daemon/trunk/src/native/unix/native: java.c jsvc-unix.c location.c
Author: jfclere Date: Wed Apr 27 09:28:57 2005 New Revision: 165006 URL: http://svn.apache.org/viewcvs?rev=165006view=rev Log: Arrange support for BS2000 mainframe. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c?rev=165006r1=165005r2=165006view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c Wed Apr 27 09:28:57 2005 @@ -114,6 +114,8 @@ } /* Load the JVM library */ +#ifdef OSD_POSIX +#else libh=dso_link(libf); if (libh==NULL) { log_error(Cannot dynamically link to %s,libf); @@ -121,6 +123,7 @@ return(false); } log_debug(JVM library %s loaded,libf); +#endif #ifdef OS_DARWIN /* @@ -148,6 +151,8 @@ } log_debug(Shell library %s loaded,appf); #endif /* ifdef OS_DARWIN */ +#ifdef OSD_POSIX +#else symb=dso_symbol(libh,JNI_CreateJavaVM); if (symb==NULL) { #ifdef OS_DARWIN @@ -161,6 +166,7 @@ #endif /* ifdef OS_DARWIN */ } log_debug(JVM library entry point found (0x%08X),symb); +#endif /* Prepare the VM initialization arguments */ @@ -173,6 +179,12 @@ #else arg.version=JNI_VERSION_1_2; #endif +#ifdef OSD_POSIX_JFC +if (JNI_GetDefaultJavaVMInitArgs(arg)0) { +log_error(Cannot init default JVM default args); +return(false); +} +#endif arg.ignoreUnrecognized=FALSE; arg.nOptions=args-onum; arg.nOptions++; /* Add abort code */ @@ -182,7 +194,8 @@ jsvc_xlate_to_ascii(opt[x].optionString); opt[x].extraInfo=NULL; } -opt[x].optionString=abort; +opt[x].optionString=strdup(abort); +jsvc_xlate_to_ascii(opt[x].optionString); opt[x].extraInfo=java_abort123; arg.options=opt; @@ -204,8 +217,12 @@ } /* And finally create the Java VM */ +#ifdef OSD_POSIX +ret=JNI_CreateJavaVM(jvm, env, arg); +#else ret=(*symb)(jvm, env, arg); -if (ret!=0) { +#endif +if (ret0) { log_error(Cannot create Java VM); return(false); } Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=165006r1=165005r2=165006view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Wed Apr 27 09:28:57 2005 @@ -501,7 +501,13 @@ controlled = getpid(); log_debug(Waiting for a signal to be delivered); create_tmp_file(args); -while (!stopping) sleep(60); /* pause() not threadsafe */ +while (!stopping) { +#ifdef OSD_POSIX +pause(); +#else +sleep(60); /* pause() not threadsafe */ +#endif +} remove_tmp_file(args); log_debug(Shutdown or reload requested: exiting); Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c?rev=165006r1=165005r2=165006view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c Wed Apr 27 09:28:57 2005 @@ -80,8 +80,8 @@ we're not going to find anything, but hope never dies... */ $JAVA_HOME/jre/lib/ CPU /classic/green_threads/libjvm.so, #if defined(OSD_POSIX) -$JAVA_HOME/jre/lib/sparc/client/green_threads/libjvm.so, -$JAVA_HOME/jre/lib/s390/client/green_threads/libjvm.so, +$JAVA_HOME/lib/s390/client/green_threads/libjvm.so, +$JAVA_HOME/lib/sparc/client/green_threads/libjvm.so, #endif $JAVA_HOME/jre/lib/classic/libjvm.so, $JAVA_HOME/jre/lib/client/libjvm.so, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r165009 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh
Author: jfclere Date: Wed Apr 27 09:37:11 2005 New Revision: 165009 URL: http://svn.apache.org/viewcvs?rev=165009view=rev Log: Add wait/stop and Tomcat/APR. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh?rev=165009r1=165008r2=165009view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/Tomcat5.sh Wed Apr 27 09:37:11 2005 @@ -29,12 +29,13 @@ # That is for Tomcat-5.0.x (Apache Tomcat/5.0) # # Adapt the following lines to your configuration -JAVA_HOME=/usr/java/j2sdk1.4.2_03 -CATALINA_HOME=/home/tomcat5/jakarta-tomcat-5/build -DAEMON_HOME=/home/tomcat5/jakarta-commons/daemon +JAVA_HOME=/home2/java/j2sdk1.4.2_03 +CATALINA_HOME=/home/tomcat5/tomcat5/jakarta-tomcat-5/build +DAEMON_HOME=/home/jfclere/daemon TOMCAT_USER=tomcat5 TMP_DIR=/var/tmp -CATALINA_OPTS= + +CATALINA_OPTS=-Djava.library.path=/home/jfclere/jakarta-tomcat-connectors/jni/native/.libs CLASSPATH=\ $JAVA_HOME/lib/tools.jar:\ $CATALINA_HOME/bin/commons-daemon.jar:\ @@ -50,6 +51,7 @@ -home $JAVA_HOME \ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$TMP_DIR \ +-wait \ -outfile $CATALINA_HOME/logs/catalina.out \ -errfile '1' \ $CATALINA_OPTS \ @@ -60,14 +62,17 @@ #-verbose \ # To get a debug of jsvc. #-debug \ +exit $? ;; stop) # # Stop Tomcat # -PID=`cat /var/run/jsvc.pid` -kill $PID +$DAEMON_HOME/src/native/unix/jsvc \ +-stop \ +org.apache.catalina.startup.Bootstrap +exit $? ;; *) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r164542 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Mon Apr 25 00:08:53 2005 New Revision: 164542 URL: http://svn.apache.org/viewcvs?rev=164542view=rev Log: Arrange warnings in Solaris8. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=164542r1=164541r2=164542view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Mon Apr 25 00:08:53 2005 @@ -345,7 +345,7 @@ static void create_tmp_file(arg_data *args) { char buff[80]; int fd; -sprintf(buff,/tmp/%d.jsvc_up, getpid()); +sprintf(buff,/tmp/%d.jsvc_up, (int) getpid()); log_debug(create_tmp_file: %s, buff); fd = open(buff, O_RDWR|O_CREAT,S_IRUSR|S_IWUSR); if (fd0) @@ -354,7 +354,7 @@ } static void remove_tmp_file(arg_data *args) { char buff[80]; -sprintf(buff,/tmp/%d.jsvc_up, getpid()); +sprintf(buff,/tmp/%d.jsvc_up, (int) getpid()); log_debug(remove_tmp_file: %s, buff); unlink(buff); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r164543 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c
Author: jfclere Date: Mon Apr 25 01:10:51 2005 New Revision: 164543 URL: http://svn.apache.org/viewcvs?rev=164543view=rev Log: Arrange the stop handling... Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c?rev=164543r1=164542r2=164543view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c Mon Apr 25 01:10:51 2005 @@ -119,7 +119,7 @@ args-wait=true; } else if (strcmp(argv[x],-stop)==0) { -args-wait=true; +args-stop=true; } else if (strcmp(argv[x],-check)==0) { args-chck=true; @@ -253,6 +253,10 @@ log_debug(| Show Help: %s,IsYesNo(args-help)); log_debug(| Check Only: %s,IsEnabledDisabled(args-chck)); + +log_debug(| Stop:%s,IsTrueFalse(args-stop)); + +log_debug(| Wait:%s,IsTrueFalse(args-wait)); log_debug(| Run as service: %s,IsYesNo(args-service)); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r164592 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c
Author: jfclere Date: Mon Apr 25 08:50:09 2005 New Revision: 164592 URL: http://svn.apache.org/viewcvs?rev=164592view=rev Log: Add location of libjvm.so in the lastest JENV. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c?rev=164592r1=164591r2=164592view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c Mon Apr 25 08:50:09 2005 @@ -79,6 +79,10 @@ /* Those are weirdos: if we got here, we're probably in troubles and we're not going to find anything, but hope never dies... */ $JAVA_HOME/jre/lib/ CPU /classic/green_threads/libjvm.so, +#if defined(OSD_POSIX) +$JAVA_HOME/jre/lib/sparc/client/green_threads/libjvm.so, +$JAVA_HOME/jre/lib/s390/client/green_threads/libjvm.so, +#endif $JAVA_HOME/jre/lib/classic/libjvm.so, $JAVA_HOME/jre/lib/client/libjvm.so, $JAVA_HOME/jre/lib/libjvm.so, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r164389 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Sat Apr 23 07:36:26 2005 New Revision: 164389 URL: http://svn.apache.org/viewcvs?rev=164389view=rev Log: Get -wait option working correctly. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=164389r1=164388r2=164389view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Sat Apr 23 07:36:26 2005 @@ -269,7 +269,7 @@ buff[i] = '\0'; pid = atoi(buff); if (kill(pid, 0)==0) { -log_error(Still running according to PID file %s, PID is %d,args-pidf,pidn); +log_error(Still running according to PID file %s, PID is %d,args-pidf,pid); lockf(fd,F_ULOCK,0); close(fd); return(122); @@ -322,6 +322,10 @@ /* * Check temporatory file created by controller * /tmp/pid.jsvc_up + * Notes: + * we fork several times + * 1 - to be a daemon before the setsid(), the son is the controler process. + * 2 - to start the JVM in the son process. (whose pid is stored in pidfile). */ static int check_tmp_file(arg_data *args) { int pid; @@ -364,12 +368,18 @@ bool havejvm=false; int fd; char buff[80]; -int i; +int i, status; log_debug(wait_child %d, pid); while (count0) { +sleep(1); /* check if the controler is still running */ -if (kill(pid, 0)!=0) -return(1); +if (waitpid(pid,status,WNOHANG)==pid) { +if (WIFEXITED(status)) +return(WEXITSTATUS(status)); +else +return(1); +} + /* check if the pid file process exists */ fd = open(args-pidf, O_RDONLY); if (fd0 havejvm) @@ -384,14 +394,22 @@ if (kill(i, 0)==0) { /* the JVM process has started */ havejvm=true; -if (check_tmp_file(args)==0) +if (check_tmp_file(args)==0) { +/* the JVM is started */ +if (waitpid(pid,status,WNOHANG)==pid) { +if (WIFEXITED(status)) +return(WEXITSTATUS(status)); +else +return(1); +} return(0); /* ready JVM started */ +} } } -sleep(6); +sleep(5); count--; } -return(1); +return(1); /* It takes more than a minute to start, something must be wrong */ } /* - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r164409 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Sat Apr 23 12:07:40 2005 New Revision: 164409 URL: http://svn.apache.org/viewcvs?rev=164409view=rev Log: Add logic to stop jsvcAdd logic to stop jsvc. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=164409r1=164408r2=164409view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Sat Apr 23 12:07:40 2005 @@ -413,6 +413,26 @@ } /* + * stop the running jsvc + */ +static int stop_child(arg_data *args) { +int pid=get_pidf(args); +int count=10; +if (pid0) { +/* kill the process and wait until the pidfile has been removed by the controler */ +kill(pid,SIGTERM); +while (count0) { +sleep(6); +pid=get_pidf(args); +if (pid=0) +return(0); /* JVM has stopped */ +count--; +} +} +return(-1); +} + +/* * son process logic. */ @@ -559,6 +579,10 @@ /* Parse command line arguments */ args=arguments(argc,argv); if (args==NULL) return(1); + +/* Stop running jsvc if required */ +if (args-stop==true) +return(stop_child(args)); /* Let's check if we can switch user/group IDs */ if (checkuser(args-user, uid, gid)==false) return(1); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r164207 - /jakarta/commons/proper/daemon/trunk/src/samples/build.xml
Author: jfclere Date: Fri Apr 22 02:49:18 2005 New Revision: 164207 URL: http://svn.apache.org/viewcvs?rev=164207view=rev Log: Use the newest collection and adjust LICENCE location. Modified: jakarta/commons/proper/daemon/trunk/src/samples/build.xml Modified: jakarta/commons/proper/daemon/trunk/src/samples/build.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/samples/build.xml?rev=164207r1=164206r2=164207view=diff == --- jakarta/commons/proper/daemon/trunk/src/samples/build.xml (original) +++ jakarta/commons/proper/daemon/trunk/src/samples/build.xml Fri Apr 22 02:49:18 2005 @@ -6,7 +6,7 @@ property name=dist.home value=../../dist/ property name=build.home value=./build/ property name=source.home value=./ - property name=commons-collections.jar value=${user.home}/commons-collections-2.1/commons-collections.jar/ + property name=commons-collections.jar value=${user.home}/commons-collections-3.1/commons-collections-3.1.jar/ target name=jars depends=SimpleDaemon,ServiceDaemon,AloneService/ @@ -14,7 +14,7 @@ description=Create SimpleDaemon.jar mkdir dir=${dist.home}/ mkdir dir=${build.home}/classes/META-INF/ -copy file=../../../LICENSE +copy file=../../LICENSE tofile=${build.home}/classes/META-INF/LICENSE.txt/ jarjarfile=${dist.home}/SimpleDaemon.jar fileset dir=${build.home}/classes @@ -27,7 +27,7 @@ description=Create ServiceDaemon.jar mkdir dir=${dist.home}/ mkdir dir=${build.home}/classes/META-INF/ -copy file=../../../LICENSE +copy file=../../LICENSE tofile=${build.home}/classes/META-INF/LICENSE.txt/ jarjarfile=${dist.home}/service.jar fileset dir=${build.home}/classes @@ -40,7 +40,7 @@ description=Create aloneservice.jar mkdir dir=${dist.home}/ mkdir dir=${build.home}/classes/META-INF/ -copy file=../../../LICENSE +copy file=../../LICENSE tofile=${build.home}/classes/META-INF/LICENSE.txt/ jarjarfile=${dist.home}/aloneservice.jar fileset dir=${build.home}/classes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r164211 - in /jakarta/commons/proper/daemon/trunk/src/samples: Native.c Native.sh SimpleDaemon.java SimpleDaemon.sh
Author: jfclere Date: Fri Apr 22 03:29:03 2005 New Revision: 164211 URL: http://svn.apache.org/viewcvs?rev=164211view=rev Log: Add the missing code used to test the crash of the JVM. Added: jakarta/commons/proper/daemon/trunk/src/samples/Native.c jakarta/commons/proper/daemon/trunk/src/samples/Native.sh Modified: jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh Added: jakarta/commons/proper/daemon/trunk/src/samples/Native.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/samples/Native.c?rev=164211view=auto == --- jakarta/commons/proper/daemon/trunk/src/samples/Native.c (added) +++ jakarta/commons/proper/daemon/trunk/src/samples/Native.c Fri Apr 22 03:29:03 2005 @@ -0,0 +1,42 @@ +/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as + * applicable. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Native routine to core JVM + */ +#include jni.h + +#ifndef _Included_Native +#define _Included_Native +#ifdef __cplusplus +extern C { +#endif +/* + * Class: Native + * Method:toto + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_SimpleDaemon_toto + (JNIEnv *env, jclass class) { + int i; + i = -1; + memcpy(i, i, i); +} + +#ifdef __cplusplus +} +#endif +#endif Added: jakarta/commons/proper/daemon/trunk/src/samples/Native.sh URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/samples/Native.sh?rev=164211view=auto == --- jakarta/commons/proper/daemon/trunk/src/samples/Native.sh (added) +++ jakarta/commons/proper/daemon/trunk/src/samples/Native.sh Fri Apr 22 03:29:03 2005 @@ -0,0 +1,18 @@ +## Copyright 2000-2005 The Apache Software Foundation or its licensors, as +## applicable. +## +## Licensed under the Apache License, Version 2.0 (the License); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an AS IS BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## +# for linux ;-) +gcc -c -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux Native.c +gcc -shared -o Native.so Native.o Modified: jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java?rev=164211r1=164210r2=164211view=diff == --- jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java (original) +++ jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java Fri Apr 22 03:29:03 2005 @@ -291,7 +291,7 @@ /* Crash JVM in a native call: It need an so file ;-) */ case '5': -System.load(/home/jakarta/X509/Native.so); +System.load(System.getProperty(native.library, ./Native.so)); toto(); break; Modified: jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh?rev=164211r1=164210r2=164211view=diff == --- jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh (original) +++ jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.sh Fri Apr 22 03:29:03 2005 @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 1999-2004 The Apache Software Foundation +# Copyright 1999-2005 The Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. @@ -30,9 +30,9 @@ -home $JAVA_HOME \ -cp $CLASSPATH \ -pidfile ./pidfile \ --verbose \ -outfile toto.txt \ -errfile '1' \ +-Dnative.library=${DAEMON_HOME}/src/samples/Native.so
svn commit: r164232 - /jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in
Author: jfclere Date: Fri Apr 22 06:01:30 2005 New Revision: 164232 URL: http://svn.apache.org/viewcvs?rev=164232view=rev Log: CFLAGS was set too early... before JAVA_HOME! Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in?rev=164232r1=164231r2=164232view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in Fri Apr 22 06:01:30 2005 @@ -68,8 +68,6 @@ CFLAGS=$CFLAGS -I`/bin/pwd -P` cd $_prevdir unset _prevdir -else - CFLAGS=$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/$supported_os fi dnl - @@ -79,6 +77,10 @@ AP_JAVA() AP_PROG_JAVAC() AP_PROG_JAR() +if test $supported_os != darwin +then + CFLAGS=$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/$supported_os +fi dnl - dnl Add gcc specific CFLAGS. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r164252 - in /jakarta/commons/proper/daemon/trunk/src/native/unix/native: arguments.c arguments.h jsvc-unix.c
Author: jfclere Date: Fri Apr 22 09:34:52 2005 New Revision: 164252 URL: http://svn.apache.org/viewcvs?rev=164252view=rev Log: Try to implement wait until JVM is started... Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.h jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c?rev=164252r1=164251r2=164252view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c Fri Apr 22 09:34:52 2005 @@ -42,6 +42,8 @@ args-vers=false; /* Don't display version */ args-help=false; /* Don't display help */ args-chck=false; /* Don't do a check-only startup */ +args-stop=false; /* Stop a running jsvc */ +args-wait=false; /* Wait until jsvc has started the JVM */ args-install=false;/* Don't install as a service */ args-remove=false; /* Don't remove the installed service */ args-service=false;/* Don't run as a service */ @@ -112,6 +114,12 @@ } else if (strcmp(argv[x],-debug)==0) { log_debug_flag=true; + +} else if (strcmp(argv[x],-wait)==0) { +args-wait=true; + +} else if (strcmp(argv[x],-stop)==0) { +args-wait=true; } else if (strcmp(argv[x],-check)==0) { args-chck=true; Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.h URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.h?rev=164252r1=164251r2=164252view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.h (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.h Fri Apr 22 09:34:52 2005 @@ -51,6 +51,10 @@ bool help; /** Only check environment without running the service. */ bool chck; +/** Stop running jsvc */ +bool stop; +/** Wait until service started */ +bool wait; /** Install as a service (win32) */ bool install; /** Remove when installed as a service (win32) */ Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=164252r1=164251r2=164252view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Fri Apr 22 09:34:52 2005 @@ -294,6 +294,107 @@ } /* + * read the pid from the pidfile + */ +static int get_pidf(arg_data *args) { +int fd; +int i; +char buff[80]; + +fd = open(args-pidf, O_RDONLY, 0); +log_debug(get_pidf: %d in %s, fd, args-pidf); +if (fd0) +return(-1); /* something has gone wrong the JVM has stopped */ +lockf(fd,F_LOCK,0); +i = read(fd,buff,sizeof(buff)); +lockf(fd,F_ULOCK,0); +close(fd); +if (i0) { +buff[i] = '\0'; +i = atoi(buff); +log_debug(get_pidf: pid %d, i); +if (kill(i, 0)==0) +return(i); +} +return(-1); +} + +/* + * Check temporatory file created by controller + * /tmp/pid.jsvc_up + */ +static int check_tmp_file(arg_data *args) { +int pid; +char buff[80]; +int fd; +pid = get_pidf(args); +if (pid0) +return(-1); +sprintf(buff,/tmp/%d.jsvc_up, pid); +log_debug(check_tmp_file: %s, buff); +fd = open(buff, O_RDONLY); +if (fd0) +return(-1); +close(fd); +return(0); +} +static void create_tmp_file(arg_data *args) { +char buff[80]; +int fd; +sprintf(buff,/tmp/%d.jsvc_up, getpid()); +log_debug(create_tmp_file: %s, buff); +fd = open(buff, O_RDWR|O_CREAT,S_IRUSR|S_IWUSR); +if (fd0) +return; +close(fd); +} +static void remove_tmp_file(arg_data *args) { +char buff[80]; +sprintf(buff,/tmp/%d.jsvc_up, getpid()); +log_debug(remove_tmp_file: %s, buff); +unlink(buff); +} + +/* + * wait until jsvc create the I am ready file + * pid is the controller and args-pidf the JVM itself. + */ +static int wait_child(arg_data *args, int pid) { +int count=10; +bool havejvm=false; +int fd; +char buff[80]; +int i; +log_debug(wait_child %d, pid); +while (count0) { +/* check if the controler is still running */ +if (kill(pid, 0)!=0
svn commit: r164011 - /jakarta/commons/proper/daemon/trunk/README
Author: jfclere Date: Thu Apr 21 01:05:21 2005 New Revision: 164011 URL: http://svn.apache.org/viewcvs?rev=164011view=rev Log: Use commons-build. Modified: jakarta/commons/proper/daemon/trunk/README Modified: jakarta/commons/proper/daemon/trunk/README URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/README?rev=164011r1=164010r2=164011view=diff == --- jakarta/commons/proper/daemon/trunk/README (original) +++ jakarta/commons/proper/daemon/trunk/README Thu Apr 21 01:05:21 2005 @@ -18,4 +18,4 @@ To build the documentation: maven site:generate -(Do not forget to get ../project.xml (jakarta-commons/project.xml) +(Do not forget to get ../commons-build: (cd ..; svn co http://svn.apache.org/repos/asf/jakarta/commons/proper/commons-build/trunk/ commons-build)) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r164012 - /jakarta/commons/proper/daemon/trunk/xdocs/faq.xml
Author: jfclere Date: Thu Apr 21 01:41:31 2005 New Revision: 164012 URL: http://svn.apache.org/viewcvs?rev=164012view=rev Log: add information about capability for 2.6.x Modified: jakarta/commons/proper/daemon/trunk/xdocs/faq.xml Modified: jakarta/commons/proper/daemon/trunk/xdocs/faq.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/xdocs/faq.xml?rev=164012r1=164011r2=164012view=diff == --- jakarta/commons/proper/daemon/trunk/xdocs/faq.xml (original) +++ jakarta/commons/proper/daemon/trunk/xdocs/faq.xml Thu Apr 21 01:41:31 2005 @@ -45,6 +45,28 @@ the group wheel cannot be set on the moved files. /p /section +section name=Runtime problems +p +On linux 2.6.x jsvc does not start and write the following error: +source +jsvc.exec error: syscall failed in set_caps +jsvc.exec error: Service exit with a return value of 4 +/source +CONFIG_SECURITY_CAPABILITIES in missing in your kernel try the following in the kernel sources: +ul +li +Configure the kernel with Default Linux Capabilities and reboot + (by make gconfig or make xconfig under security options and Enable different security models) +/li +li +Insert the module capability: +source +modprobe capability +/source +/li +/ul +/p +/section /body /document - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r164072 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Thu Apr 21 08:13:50 2005 New Revision: 164072 URL: http://svn.apache.org/viewcvs?rev=164072view=rev Log: Add supplementary groups (Fix PR 34493). Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=164072r1=164071r2=164072view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Thu Apr 21 08:13:50 2005 @@ -24,6 +24,7 @@ #include fcntl.h #include stdio.h #include pwd.h +#include grp.h #ifdef OS_LINUX #include sys/prctl.h #include sys/syscall.h @@ -86,6 +87,10 @@ if (user!=NULL) { if (setgid(gid)!=0) { log_error(Cannot set group id for user '%s',user); +return(-1); +} +if (initgroups(user, gid)!=0) { +log_error(Cannot set supplement group list for user '%s',user); return(-1); } if (setuid(uid)!=0) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r161851 - jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in
Author: jfclere Date: Tue Apr 19 00:31:55 2005 New Revision: 161851 URL: http://svn.apache.org/viewcvs?view=revrev=161851 Log: Fix 31613: - Find default JAVA_HOME - Correctly set the CFLAGS for the includes. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in?view=diffr1=161850r2=161851 == --- jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in Tue Apr 19 00:31:55 2005 @@ -16,7 +16,7 @@ dnl - dnl Author Pier Fumagalli mailto:[EMAIL PROTECTED] -dnl Version $Id: configure.in,v 1.4 2005/01/03 11:05:20 jfclere Exp $ +dnl Version $Id$ dnl - dnl - @@ -47,30 +47,38 @@ AC_CHECK_TOOL(RANLIB, ranlib, :) dnl - -dnl Check JAVA environment -dnl - -AP_MSG_HEADER([Java compilation tools]) -AP_JAVA() -AP_PROG_JAVAC() -AP_PROG_JAR() - -dnl - dnl Check if this host is supported dnl - AP_MSG_HEADER([Host support]) AP_SUPPORTED_HOST() if test $supported_os = darwin then + if test -z $JAVA_HOME -a -d /System/Library/Frameworks/JavaVM.framework/Home; then + JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home + fi + _prevdir=`/bin/pwd` - cd $JAVA_HOME - cd .. - cd Headers + if test -n $JAVA_HOME -a -d $JAVA_HOME/include; then +cd $JAVA_HOME/include + elif test -n $JAVA_HOME -a -d $JAVA_HOME/../Headers; then +cd $JAVA_HOME/../Headers + else +cd /System/Library/Frameworks/JavaVM.framework/Headers + fi CFLAGS=$CFLAGS -I`/bin/pwd -P` cd $_prevdir unset _prevdir else CFLAGS=$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/$supported_os fi + +dnl - +dnl Check JAVA environment +dnl - +AP_MSG_HEADER([Java compilation tools]) +AP_JAVA() +AP_PROG_JAVAC() +AP_PROG_JAR() dnl - dnl Add gcc specific CFLAGS. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r161852 - jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c
Author: jfclere Date: Tue Apr 19 00:41:23 2005 New Revision: 161852 URL: http://svn.apache.org/viewcvs?view=revrev=161852 Log: Fix 31613: Use JVM 1.4 when available (otherwise 1.3 will be used...) Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c?view=diffr1=161851r2=161852 == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c Tue Apr 19 00:41:23 2005 @@ -163,7 +163,16 @@ log_debug(JVM library entry point found (0x%08X),symb); /* Prepare the VM initialization arguments */ -arg.version=JNI_VERSION_1_2; + +/* + Mac OS X Java will load JVM 1.3.1 instead of 1.4.2 if JNI_VERSION_1_2 + is specified. So use JNI_VERSION_1_4 if we can. +*/ +#if defined(JNI_VERSION_1_4) +arg.version=JNI_VERSION_1_4; +#else +arg.version=JNI_VERSION_1_2; +#endif arg.ignoreUnrecognized=FALSE; arg.nOptions=args-onum; arg.nOptions++; /* Add abort code */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r161917 - jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Tue Apr 19 09:49:08 2005 New Revision: 161917 URL: http://svn.apache.org/viewcvs?view=revrev=161917 Log: Fix 33580: note the new exit code 122 to prevent unlink of the pidfile. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?view=diffr1=161916r2=161917 == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Tue Apr 19 09:49:08 2005 @@ -19,7 +19,10 @@ #include signal.h #include unistd.h #include sys/types.h +#include sys/stat.h #include sys/wait.h +#include fcntl.h +#include stdio.h #include pwd.h #ifdef OS_LINUX #include sys/prctl.h @@ -240,20 +243,65 @@ } /* + * Check pid and if still running + */ + +static int check_pid(arg_data *args) { +int fd; +FILE *pidf; +char buff[80]; +pid_t pidn=getpid(); +int i,pid; + +fd = open(args-pidf,O_RDWR|O_CREAT,S_IRUSR|S_IWUSR); +if (fd0) { +log_error(Cannot open PID file %s, PID is %d,args-pidf,pidn); +return(-1); +} else { +lockf(fd,F_LOCK,0); +i = read(fd,buff,sizeof(buff)); +if (i0) { +buff[i] = '\0'; +pid = atoi(buff); +if (kill(pid, 0)==0) { +log_error(Still running according to PID file %s, PID is %d,args-pidf,pidn); +lockf(fd,F_ULOCK,0); +close(fd); +return(122); +} +} + +/* skip writing the pid file if version or check */ +if (args-vers!=true args-chck!=true) { +lseek(fd, SEEK_SET, 0); +pidf = fdopen(fd,r+); +fprintf(pidf,%d\n,(int)getpid()); +fflush(pidf); +lockf(fd,F_ULOCK,0); +fclose(pidf); +close(fd); +} else { +lockf(fd,F_ULOCK,0); +close(fd); +} +} +return(0); +} + +/* * son process logic. */ static int child(arg_data *args, home_data *data, uid_t uid, gid_t gid) { -FILE *pidf=fopen(args-pidf,w); -pid_t pidn=getpid(); int ret=0; -/* Write the our pid in the pid file */ -if (pidf!=NULL) { -fprintf(pidf,%d\n,(int)pidn); -fclose(pidf); -} else { -log_error(Cannot open PID file %s, PID is %d,args-pidf,pidn); +/* check the pid file */ +ret = check_pid(args); +if (args-vers!=true args-chck!=true) { +if (ret==122) +return(ret); +if (ret0) +return(ret); } /* create a new process group to prevent kill 0 killing the monitor process */ @@ -475,7 +523,8 @@ status=WEXITSTATUS(status); /* Delete the pid file */ -unlink(args-pidf); +if (args-vers!=true args-chck!=true status!=122) +unlink(args-pidf); /* If the child got out with 123 he wants to be restarted */ if (status==123) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r161918 - jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt
Author: jfclere Date: Tue Apr 19 10:02:09 2005 New Revision: 161918 URL: http://svn.apache.org/viewcvs?view=revrev=161918 Log: Add to 3 fixed bugs to list. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt?view=diffr1=161917r2=161918 == --- jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Tue Apr 19 10:02:09 2005 @@ -8,3 +8,5 @@ * Add support for Tru64 (PR 29465). * Remove the pid file when son exits correctly (PR 31614). * Add support for JVM-4.1.x on MAC OS X (part of PR 31613). + * Prevent starting jsvc several times with the same pidfile (PR 33580). + * Finish fixing 31613, automatic detection of JAVA_HOME and headers locations. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/daemon/src/native/unix/native java.c
jfclere 2005/01/04 07:59:59 Modified:daemon/src/native/unix/native java.c Log: Fix location of libjvm_compat.dylib (PR 31613). Revision ChangesPath 1.5 +15 -3 jakarta-commons/daemon/src/native/unix/native/java.c Index: java.c === RCS file: /home/cvs/jakarta-commons/daemon/src/native/unix/native/java.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- java.c2 Aug 2004 16:07:55 - 1.4 +++ java.c4 Jan 2005 15:59:59 - 1.5 @@ -86,6 +86,7 @@ #ifdef OS_DARWIN dso_handle apph=NULL; char appf[1024]; +struct stat sb; #endif /* ifdef OS_DARWIN */ jint (*symb)(JavaVM **, JNIEnv **, JavaVMInitArgs *); JNINativeMethod nativemethod; @@ -122,12 +123,23 @@ log_debug(JVM library %s loaded,libf); #ifdef OS_DARWIN -/* MacOS/X actually has two libraries, one with the REAL vm, and one for - the VM startup. The first one (libappshell.dyld) contains CreateVM */ +/* + MacOS/X actually has two libraries, one with the REAL vm, and one for + the VM startup. + before JVM 1.4.1 The first one (libappshell.dyld) contains CreateVM + after JVM 1.4.1 The library name is libjvm_compat.dylib. +*/ if (replace(appf,1024,$JAVA_HOME/../Libraries/libappshell.dylib, $JAVA_HOME,data-path)!=0) { log_error(Cannot replace values in loader library); return(false); +} +if (stat(appf, sb)) { +if (replace(appf,1024,$JAVA_HOME/../Libraries/libjvm_compat.dylib, +$JAVA_HOME,data-path)!=0) { +log_error(Cannot replace values in loader library); +return(false); +} } apph=dso_link(appf); if (apph==NULL) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/daemon/src/native/unix INSTALL.txt
jfclere 2005/01/04 08:36:54 Modified:daemon/src/native/unix INSTALL.txt Log: Add a note about Mac OS X. Revision ChangesPath 1.6 +2 -0 jakarta-commons/daemon/src/native/unix/INSTALL.txt Index: INSTALL.txt === RCS file: /home/cvs/jakarta-commons/daemon/src/native/unix/INSTALL.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- INSTALL.txt 21 Oct 2004 08:27:24 - 1.5 +++ INSTALL.txt 4 Jan 2005 16:36:54 - 1.6 @@ -27,6 +27,8 @@ JAVACFLAGS=-c; export JAVACFLAGS ./configure +Note: On Mac OS X dir is /System/Library/Frameworks/JavaVM.framework/Home. + If your operating system is supported, configure will go thru cleanly, otherwise it will report an error (please send us the details of your OS/JDK, or a patch against the sources). To build the binaries and - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/daemon/src/native/unix CHANGES.txt
jfclere 2005/01/04 09:45:41 Modified:daemon/src/native/unix CHANGES.txt Log: Nearly ready for Release. Revision ChangesPath 1.3 +6 -2 jakarta-commons/daemon/src/native/unix/CHANGES.txt Index: CHANGES.txt === RCS file: /home/cvs/jakarta-commons/daemon/src/native/unix/CHANGES.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CHANGES.txt 5 Nov 2004 16:55:15 - 1.2 +++ CHANGES.txt 4 Jan 2005 17:45:41 - 1.3 @@ -1,6 +1,10 @@ JAKARTA COMMONS DAEMON (UNIX) CHANGELOG: Last modified at [$Date$] -Changes with 1.1 +Changes with 1.0.1 * Allow enableassertions -ea (PR 304310). * Add -lpthread to LDFLAGS on Linux (PR 30177). + * Add support for x86_64 (PR 27523). + * Add support for Tru64 (PR 29465). + * Remove the pid file when son exits correctly (PR 31614). + * Add support for JVM-4.1.x on MAC OS X (part of PR 31613). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/daemon/src/native/unix/support apsupport.m4
jfclere 2005/01/03 02:17:24 Modified:daemon/src/native/unix/support apsupport.m4 Log: Fix bug 27523 Thanks to Tom Emerson tree at basistech dot cos... Revision ChangesPath 1.7 +3 -1 jakarta-commons/daemon/src/native/unix/support/apsupport.m4 Index: apsupport.m4 === RCS file: /home/cvs/jakarta-commons/daemon/src/native/unix/support/apsupport.m4,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- apsupport.m4 5 Nov 2004 16:53:10 - 1.6 +++ apsupport.m4 3 Jan 2005 10:17:24 - 1.7 @@ -28,6 +28,8 @@ CFLAGS=$CFLAGS -DCPU=\\\$host_cpu\\\ ;; i?86) CFLAGS=$CFLAGS -DCPU=\\\i386\\\ ;; + x86_64) +CFLAGS=$CFLAGS -DCPU=\\\amd64\\\ ;; bs2000) CFLAGS=$CFLAGS -DCPU=\\\osd\\\ -DCHARSET_EBCDIC -DOSD_POSIX supported_os=osd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/daemon/src/native/unix/native location.c
jfclere 2005/01/03 02:58:05 Modified:daemon/src/native/unix/native location.c Log: Finish fixing of PR 29465. Revision ChangesPath 1.6 +2 -2 jakarta-commons/daemon/src/native/unix/native/location.c Index: location.c === RCS file: /home/cvs/jakarta-commons/daemon/src/native/unix/native/location.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- location.c10 Jun 2004 05:21:24 - 1.5 +++ location.c3 Jan 2005 10:58:05 - 1.6 @@ -107,7 +107,7 @@ $JAVA_HOME/../Libraries/lib$VM_NAME.dylib, #elif defined(OS_CYGWIN) $JAVA_HOME/jre/bin/$VM_NAME/jvm.dll, /* Sun JDK 1.3 */ -#elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_BSD) || defined(OS_FREEBSD) +#elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_BSD) || defined(OS_FREEBSD) || defined(OS_TRU64) $JAVA_HOME/jre/lib/ CPU /$VM_NAME/libjvm.so,/* Sun JDK 1.3 */ $JAVA_HOME/lib/ CPU /$VM_NAME/libjvm.so,/* Sun JRE 1.3 */ #elif defined(OS_SYSV) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/daemon/src/native/unix configure.in
jfclere 2005/01/03 03:05:20 Modified:daemon/src/native/unix configure.in Log: Request autoconf to be at least 2.53 (PR 31017). Revision ChangesPath 1.4 +4 -1 jakarta-commons/daemon/src/native/unix/configure.in Index: configure.in === RCS file: /home/cvs/jakarta-commons/daemon/src/native/unix/configure.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- configure.in 27 Feb 2004 08:40:46 - 1.3 +++ configure.in 3 Jan 2005 11:05:20 - 1.4 @@ -22,6 +22,9 @@ dnl - dnl Initialize AutoConf dnl - + +AC_PREREQ(2.53) + sinclude(./support/apfunctions.m4)dnl sinclude(./support/apjava.m4)dnl sinclude(./support/apsupport.m4)dnl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/daemon/src/native/unix/native jsvc-unix.c
jfclere 2005/01/03 03:51:23 Modified:daemon/src/native/unix/native jsvc-unix.c Log: Delete the pid file when the son process exists correctly. (PR: 31614). Revision ChangesPath 1.11 +4 -1 jakarta-commons/daemon/src/native/unix/native/jsvc-unix.c Index: jsvc-unix.c === RCS file: /home/cvs/jakarta-commons/daemon/src/native/unix/native/jsvc-unix.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- jsvc-unix.c 18 Mar 2004 03:59:41 - 1.10 +++ jsvc-unix.c 3 Jan 2005 11:51:23 - 1.11 @@ -474,6 +474,9 @@ if (WIFEXITED(status)) { status=WEXITSTATUS(status); +/* Delete the pid file */ +unlink(args-pidf); + /* If the child got out with 123 he wants to be restarted */ if (status==123) { log_debug(Reloading service); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/daemon/xdocs procrun.xml
jfclere 2004/12/31 02:23:20 Modified:daemon/xdocs procrun.xml Log: Add missing body. Revision ChangesPath 1.9 +2 -0 jakarta-commons/daemon/xdocs/procrun.xml Index: procrun.xml === RCS file: /home/cvs/jakarta-commons/daemon/xdocs/procrun.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- procrun.xml 2 Aug 2004 17:57:04 - 1.8 +++ procrun.xml 31 Dec 2004 10:23:20 - 1.9 @@ -6,6 +6,7 @@ author email=[EMAIL PROTECTED]Mladen Turk/author /properties +body section name=Introduction p Procrun is a set of libraries and applications for making Java @@ -332,4 +333,5 @@ /p /section +/body /document - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/daemon project.xml
jfclere 2004/12/31 02:49:32 Modified:daemon project.xml Log: Change the logo... Revision ChangesPath 1.13 +1 -1 jakarta-commons/daemon/project.xml Index: project.xml === RCS file: /home/cvs/jakarta-commons/daemon/project.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- project.xml 31 Dec 2004 07:43:45 - 1.12 +++ project.xml 31 Dec 2004 10:49:32 - 1.13 @@ -30,7 +30,7 @@ organization nameThe Apache Software Foundation/name urlhttp://jakarta.apache.org/url -logohttp://jakarta.apache.org/images/original-jakarta-logo.gif/logo +logohttp://jakarta.apache.org/images/jakarta-logo.gif/logo /organization licenses - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/daemon project.xml
jfclere 2004/12/30 23:43:45 Modified:daemon project.xml Log: Remove references to nagoya. Revision ChangesPath 1.12 +2 -2 jakarta-commons/daemon/project.xml Index: project.xml === RCS file: /home/cvs/jakarta-commons/daemon/project.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- project.xml 13 Jul 2004 12:46:02 - 1.11 +++ project.xml 31 Dec 2004 07:43:45 - 1.12 @@ -57,13 +57,13 @@ nameCommons Dev List/name subscribe[EMAIL PROTECTED]/subscribe unsubscribe[EMAIL PROTECTED]/unsubscribe - archivehttp://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]/archive + archivehttp://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]/archive /mailingList mailingList nameCommons User List/name subscribe[EMAIL PROTECTED]/subscribe unsubscribe[EMAIL PROTECTED]/unsubscribe - archivehttp://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]/archive + archivehttp://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]/archive /mailingList /mailingLists - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/daemon/src/native/unix/native arguments.c
jfclere 2004/11/05 03:42:18 Modified:daemon/src/native/unix/native arguments.c Log: PR 30431: Thanks to Simon Roberts. Revision ChangesPath 1.5 +4 -1 jakarta-commons/daemon/src/native/unix/native/arguments.c Index: arguments.c === RCS file: /home/cvs/jakarta-commons/daemon/src/native/unix/native/arguments.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- arguments.c 9 Feb 2004 15:55:21 - 1.4 +++ arguments.c 5 Nov 2004 11:42:17 - 1.5 @@ -169,6 +169,9 @@ } else if (strstr(argv[x],-X)==argv[x]) { args-opts[args-onum++]=strdup(argv[x]); +} else if (strstr(argv[x],-ea)==argv[x]) { +args-opts[args-onum++]=strdup(argv[x]); + } else if (strstr(argv[x],-)==argv[x]) { log_error(Invalid option %s,argv[x]); return(NULL); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]