jfclere 2004/11/05 04:08:10 Modified: daemon/src/samples SimpleDaemon.java SimpleDaemon.sh Log: Example to test PR 28270. Revision Changes Path 1.3 +9 -1 jakarta-commons/daemon/src/samples/SimpleDaemon.java Index: SimpleDaemon.java =================================================================== RCS file: /home/cvs/jakarta-commons/daemon/src/samples/SimpleDaemon.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SimpleDaemon.java 27 Feb 2004 07:57:51 -0000 1.2 +++ SimpleDaemon.java 5 Nov 2004 12:08:10 -0000 1.3 @@ -35,6 +35,8 @@ private String directory=null; private Vector handlers=null; + public static native void toto(); + public SimpleDaemon() { super(); System.err.println("SimpleDaemon: instance "+this.hashCode()+ @@ -222,6 +224,7 @@ out.println(" 2) Reload"); out.println(" 3) Create a file"); out.println(" 4) Disconnect"); + out.println(" 5) Cause a core of the JVM"); out.print("Your choiche: "); } @@ -275,6 +278,11 @@ case '4': out.println("Disconnecting..."); return; + /* Need a so file ;-) */ + case '5': + System.load("/home/jakarta/X509/Native.so"); + toto(); + break; /* Discard any carriage return / newline characters */ case '\r': 1.4 +3 -0 jakarta-commons/daemon/src/samples/SimpleDaemon.sh Index: SimpleDaemon.sh =================================================================== RCS file: /home/cvs/jakarta-commons/daemon/src/samples/SimpleDaemon.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SimpleDaemon.sh 27 Feb 2004 09:17:10 -0000 1.3 +++ SimpleDaemon.sh 5 Nov 2004 12:08:10 -0000 1.4 @@ -30,6 +30,9 @@ -home $JAVA_HOME \ -cp $CLASSPATH \ -pidfile ./pidfile \ + -verbose \ + -outfile toto.txt \ + -errfile '&1' \ SimpleDaemon \ # # To get a verbose JVM
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]