Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 77274 invoked from network); 17 Feb 2011 06:29:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Feb 2011 06:29:50 -0000 Received: (qmail 63811 invoked by uid 500); 17 Feb 2011 06:29:50 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 63002 invoked by uid 500); 17 Feb 2011 06:29:48 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 62992 invoked by uid 99); 17 Feb 2011 06:29:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Feb 2011 06:29:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Feb 2011 06:29:46 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D2D471AA4BB for ; Thu, 17 Feb 2011 06:29:24 +0000 (UTC) Date: Thu, 17 Feb 2011 06:29:24 +0000 (UTC) From: "Steve Ash (JIRA)" To: issues@commons.apache.org Message-ID: <1380659661.1931.1297924164859.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Updated: (DAEMON-198) Unexpected behavior parsing arguments to "install service" for procrun MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DAEMON-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ash updated DAEMON-198: ----------------------------- Description: When running the command line to install a procrun service, I had a batch script that looked something like: {panel} set basePath=c:\base path\ ... procrun.exe //IS ... ++JvmOptions=-DBASE_PATH="%basePath%" --JvmMs=... {panel} Unfortunately when the arguments were parsed the ending slash for the basePath environment variable caused the double quote to be escaped. This threw off all of the subsequent arguments, causing a large string to be put into the Jvm Options registry key, but the min heap size (for example) to be not set at all. The workaround we used was to put a double slash at the end of basePath, e.g. basePath=c:\base path\\. We couldn't easily switch all of the slashes to front slashes because we were using %cd% to fill in some of the paths. Though maybe the mixed slashes would be ok. In any case, as this is a Windows application a trailing slash I would expect to be common, and in parsing command line arguments with paths in quotes-- this seems like a common point of potential confusion and unexpected results. Maybe its not worth the trouble, but I wanted to bring it up in any case. was: When running the command line to install a procrun service, I had a batch script that looked something like: {panel} set basePath=c:\base path\ ... procrun.exe //IS ... ++JvmOptions=-DBASE_PATH="%basePath%" --JvmMs=... {panel} Unfortunately when the arguments were parsed the ending slash for the basePath environment variable caused the double quote to be escaped. This threw off all of the subsequent arguments, causing a large string to be put into the Jvm Options registry key, but the min heap size (for example) to be not set at all. The workaround we used was to put a double slash at the end of basePath, e.g. {{basePath=c:\base path\\}}. We couldn't easily switch all of the slashes to front slashes because we were using {{%cd%}} to fill in some of the paths. Though maybe the mixed slashes would be ok. In any case, as this is a Windows application a trailing slash I would expect to be common, and in parsing command line arguments with paths in quotes-- this seems like a common point of potential confusion and unexpected results. Maybe its not worth the trouble, but I wanted to bring it up in any case. > Unexpected behavior parsing arguments to "install service" for procrun > ---------------------------------------------------------------------- > > Key: DAEMON-198 > URL: https://issues.apache.org/jira/browse/DAEMON-198 > Project: Commons Daemon > Issue Type: Bug > Components: Procrun > Affects Versions: 1.0.3 > Reporter: Steve Ash > Priority: Minor > > When running the command line to install a procrun service, I had a batch script that looked something like: > {panel} > set basePath=c:\base path\ > ... > procrun.exe //IS ... ++JvmOptions=-DBASE_PATH="%basePath%" --JvmMs=... > {panel} > Unfortunately when the arguments were parsed the ending slash for the basePath environment variable caused the double quote to be escaped. This threw off all of the subsequent arguments, causing a large string to be put into the Jvm Options registry key, but the min heap size (for example) to be not set at all. > The workaround we used was to put a double slash at the end of basePath, e.g. basePath=c:\base path\\. We couldn't easily switch all of the slashes to front slashes because we were using %cd% to fill in some of the paths. Though maybe the mixed slashes would be ok. > In any case, as this is a Windows application a trailing slash I would expect to be common, and in parsing command line arguments with paths in quotes-- this seems like a common point of potential confusion and unexpected results. Maybe its not worth the trouble, but I wanted to bring it up in any case. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira