Author: mturk Date: Sat Oct 29 16:07:35 2011 New Revision: 1194913 URL: http://svn.apache.org/viewvc?rev=1194913&view=rev Log: DAEMON-222 Opt out -procname for Linux at compile time
Modified: commons/proper/daemon/trunk/RELEASE-NOTES.txt commons/proper/daemon/trunk/src/native/unix/CHANGES.txt commons/proper/daemon/trunk/src/native/unix/native/arguments.c commons/proper/daemon/trunk/src/native/unix/native/arguments.h commons/proper/daemon/trunk/src/native/unix/native/help.c Modified: commons/proper/daemon/trunk/RELEASE-NOTES.txt URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/RELEASE-NOTES.txt?rev=1194913&r1=1194912&r2=1194913&view=diff ============================================================================== --- commons/proper/daemon/trunk/RELEASE-NOTES.txt (original) +++ commons/proper/daemon/trunk/RELEASE-NOTES.txt Sat Oct 29 16:07:35 2011 @@ -80,6 +80,8 @@ NEW FEATURES: BUG FIXES: +1.0.8: DAEMON-222, DAEMON-223 + 1.0.7: DAEMON-211, DAEMON-214 1.0.6: DAEMON-186, DAEMON-193, DAEMON-194, DAEMON-206, DAEMON-185, DAEMON-200 Modified: commons/proper/daemon/trunk/src/native/unix/CHANGES.txt URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/unix/CHANGES.txt?rev=1194913&r1=1194912&r2=1194913&view=diff ============================================================================== --- commons/proper/daemon/trunk/src/native/unix/CHANGES.txt (original) +++ commons/proper/daemon/trunk/src/native/unix/CHANGES.txt Sat Oct 29 16:07:35 2011 @@ -5,6 +5,7 @@ Changes with 1.0.8 * Better detection of JDK (DAEMON-220) * Use CPPFLAGS in makefile (DAEMON-223) * Add -umask parameter (DAEMON-221) + * Make sure -procname is visible only on Linux (DAEMON-222) Changes with 1.0.7 Modified: commons/proper/daemon/trunk/src/native/unix/native/arguments.c URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/unix/native/arguments.c?rev=1194913&r1=1194912&r2=1194913&view=diff ============================================================================== --- commons/proper/daemon/trunk/src/native/unix/native/arguments.c (original) +++ commons/proper/daemon/trunk/src/native/unix/native/arguments.c Sat Oct 29 16:07:35 2011 @@ -170,7 +170,9 @@ static arg_data *parse(int argc, char *a args->outfile = "/dev/null"; /* Swallow by default */ args->errfile = "/dev/null"; /* Swallow by default */ args->redirectstdin = true; /* Redirect stdin to /dev/null by default */ +#ifdef OS_LINUX args->procname = "jsvc.exec"; +#endif #ifndef JSVC_UMASK args->umask = 0077; #else @@ -375,6 +377,7 @@ static arg_data *parse(int argc, char *a else if (!strcmp(argv[x], "-disablesystemassertions")) { args->opts[args->onum++] = strdup(argv[x]); } +#ifdef OS_LINUX else if (!strcmp(argv[x], "-procname")) { args->procname = optional(argc, argv, x++); if (args->procname == NULL) { @@ -382,6 +385,7 @@ static arg_data *parse(int argc, char *a return NULL; } } +#endif else if (!strncmp(argv[x], "-agentlib:", 10)) { args->opts[args->onum++] = strdup(argv[x]); } Modified: commons/proper/daemon/trunk/src/native/unix/native/arguments.h URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/unix/native/arguments.h?rev=1194913&r1=1194912&r2=1194913&view=diff ============================================================================== --- commons/proper/daemon/trunk/src/native/unix/native/arguments.h (original) +++ commons/proper/daemon/trunk/src/native/unix/native/arguments.h Sat Oct 29 16:07:35 2011 @@ -69,8 +69,10 @@ typedef struct { char *outfile; /** Destination for stderr */ char *errfile; +#ifdef OS_LINUX /** Program name for Linux **/ char *procname; +#endif /** Whether to redirect stdin to /dev/null or not. Defaults to true **/ bool redirectstdin; /** What umask to use **/ Modified: commons/proper/daemon/trunk/src/native/unix/native/help.c URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/unix/native/help.c?rev=1194913&r1=1194912&r2=1194913&view=diff ============================================================================== --- commons/proper/daemon/trunk/src/native/unix/native/help.c (original) +++ commons/proper/daemon/trunk/src/native/unix/native/help.c Sat Oct 29 16:07:35 2011 @@ -89,8 +89,10 @@ void help(home_data *data) printf(" load native agent library by full pathname\n"); printf(" -javaagent:<jarpath>[=<options>]\n"); printf(" load Java programming language agent, see java.lang.instrument\n"); +#ifdef OS_LINUX printf(" -procname <procname>\n"); - printf(" use the specified process name (works only for Linux)\n"); + printf(" use the specified process name\n"); +#endif printf(" -wait <waittime>\n"); printf(" wait waittime seconds for the service to start\n"); printf(" waittime should multiple of 10 (min=10)\n");