commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Ash (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DAEMON-198) Unexpected behavior parsing arguments to "install service" for procrun
Date Thu, 17 Feb 2011 06:29:24 GMT

     [ 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

        

Mime
View raw message