Date: Tue, 5 Apr 2005 20:57:30 +1200 From: Jonathan Chen <jonc@chen.org.nz> To: Kang Liu <liukang@bjpu.edu.cn> Cc: freebsd-java@FreeBSD.org Subject: Re: ports/38020: www/jakarta-tomcat4: stop tomcat via java -jarbootstrap.jar stop Message-ID: <20050405085730.GB18346@osiris.chen.org.nz> In-Reply-To: <312615710.17152@bjut.edu.cn> References: <200504041150.j34Bo7AJ021860@freefall.freebsd.org> <312615710.17152@bjut.edu.cn>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 04, 2005 at 08:12:33PM +0800, Kang Liu wrote: > A draft version of daemonctl.c for tomcat has been submitted to ports/75143, > which can solve this issue. > http://www.freebsd.org/cgi/query-pr.cgi?pr=75143 There's a bit of code in here that doesn't look right: [...] if (pid2 == 0) { arguments = malloc(sizeof(char*) * 6 ); arguments[0] = "%%JAVA_HOME%%/%%JAVA_CMD%%"; arguments[1] = "-jar"; arguments[2] = %%JAVA_ARGS%%; arguments[3] = "%%APP_HOME%%/%%JAR_FILE%%"; arguments[4] = "stop"; arguments[5] = NULL; [...] } Having the %%JAVA_ARGS%% substitution follow "-jar" doesn't look correct to to me. Shouldn't the jar-file follow the "-jar" argument? A possible alternative is pick up the code from java/jboss4; remove the "jbossArgs" code in daemonctl.c, make the right substitutions in the Makefile and you'll have a daemonctl program that does accept JVM arguments, as well as having a RCng-fied startup script as well. Cheers. -- Jonathan Chen | To do is to be -- Nietzsche <jonc@chen.org.nz> | To be is to do -- Sartre | Scooby do be do -- Scooby
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050405085730.GB18346>