Bug 55104 - Allow passing arguments with spaces to Commons Daemon
Summary: Allow passing arguments with spaces to Commons Daemon
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Integration (show other bugs)
Version: 7.0.41
Hardware: All All
: P2 enhancement with 1 vote (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-16 18:13 UTC by marko asplund
Modified: 2020-01-16 20:24 UTC (History)
1 user (show)



Attachments
allow passing arguments with spaces (585 bytes, text/plain)
2013-06-16 18:15 UTC, marko asplund
Details

Note You need to log in before you can comment on or make changes to this bug.
Description marko asplund 2013-06-16 18:13:45 UTC
With the current version of the Commons Daemon wrapper script (daemon.sh) it's not possible to pass arguments with spaces to jsvc.

For example jsvc fails to start with the following command:

JSVC_OPTS="-XX:OnOutOfMemoryError='/bin/ls foo bar'" daemon.sh start

The attached patch makes it possible to pass arguments with spaces to Commons Daemon like this:

daemon.sh start -XX:OnOutOfMemoryError='/bin/ls foo bar'

The patch also allows daemon.sh invoker override hardcoded arguments (i.e. "-wait"). Overriding the current wait default value is often required because Tomcat startup may take a long time due to entropy read operation blocking by default on Linux.
Comment 1 marko asplund 2013-06-16 18:15:09 UTC
Created attachment 30446 [details]
allow passing arguments with spaces
Comment 2 Michael Osipov 2019-08-12 14:16:26 UTC
..and it won't because Bourne shell does not support this. Same issue persists for the Maven start script. One would need to switch to Bash.
Comment 3 Mark Thomas 2020-01-16 20:24:11 UTC
This appears to have been addressed  - probably by the changes to BZ 63815.