commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reinhold Fuereder" <>
Subject RE: [exec] Watchdog test cases and argument quotation fix
Date Tue, 24 Apr 2007 06:20:58 GMT
Hi Rahul,

Thanks for the information; I am going to follow your advice.

Please note that JIRA issue SANDBOX-185 ([exec] setWatchDog method in
DefaultExecutor has no affect) was fixed by user sgoeschl on 15.03.2007
12:56 ("Fixed typo that broke the usage of the watchdog (watchDog vs.
watchdog)") already.


-----Original Message-----
From: Rahul Akolkar [] 
Sent: Montag, 23. April 2007 19:16
To: Jakarta Commons Users List
Cc: Reinhold Fuereder
Subject: Re: [exec] Watchdog test cases and argument quotation fix

On 4/20/07, Reinhold Fuereder <> wrote:
> Hello Brett et al.,
> Please find attached a patch for apache commons exec with respect to
two issues (note that I have only tested them under M$ Windows yet, but
I am very confident that these changes should work under *nix too):

Please consider posting to JIRA [1] instead. That way, it will remain
on the radar (and we won't have to remember to CC you on replies
either). Thanks.


[1]  (use component

> ---
> (1) ExecuteWatchdog test cases ( one for
synchronous and one for asynchronous execution including the required
test scripts (watchdog.bat, and test app (
Whereas the one for asynchronous is a bit more elaborated and kind of
"more correct", please note the hint on the well-known Java "bug"/issue
under M$ Windows with respect to the Process.destroy() method in the
asynchronous test case code.
> ---
> (2) Add a method to CommandLine ( to add arguments
without quoting, i.e. pre-quoted arguments, because default quoting may
not be correct in all cases. Note that I have not tried to find out if
the default quoting can be changed accordingly. And also that maybe this
problem is only M$ Windows specific, but I don't know (yet). The
encountered problem was:
> I want to start an executable (runMemorySud.cmd) with a list of JVM GC
options that in turn will then start a Java application utilising these
JVM GC options. I failed to find an accepted way of specifying the
> runMemorySud.cmd -XX:+UseParallelGC -XX:ParallelGCThreads=2
> After quite some time I found out that the default quoting of apache
commons exec is causing the problem, and with default pure standard Java
it works as expected by using (see attached example):
> Process p = new ProcessBuilder("runMemorySud.cmd", "10", "30",
"-XX:+UseParallelGC", "\"-XX:ParallelGCThreads=2\"").start();
> However, as I said, I found no way of being able to "propagate this to
the ProcessBuilder through apache commons exec". Thus, the need for
adding a so-called pre-quoted argument addArgument() method.
> ---
> Would you mind applying these patches?
> Thanks,
>         Reinhold
> P.S.: Please CC me in your potential responses as I am not subscribed
to this mailing list.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message