diff --git a/docs/manual/running.html b/docs/manual/running.html
index ca2d7bdca..2ef471dd0 100644
--- a/docs/manual/running.html
+++ b/docs/manual/running.html
@@ -78,20 +78,21 @@ those without a description
are listed as
ant [options] [target [target2 [target3] ...]] Options: - -help print this message - -projecthelp print project help information + -help, -h print this message + -projecthelp, -p print project help information -version print the version information and exit -diagnostics print information that might be helpful to diagnose or report problems. -quiet, -q be extra quiet -verbose, -v be extra verbose - -debug print debugging information - -emacs produce logging information without adornments - -libspecifies a path to search for jars and classes + -debug, -d print debugging information + -emacs, -e produce logging information without adornments + -lib <path> specifies a path to search for jars and classes -logfile <file> use given file for log -l <file> '' -logger <classname> the class which is to perform logging -listener <classname> add an instance of class as a project listener + -noinput do not allow interactive input -buildfile <file> use given buildfile -file <file> '' -f <file> '' @@ -101,8 +102,10 @@ Options: -propertyfile <name> load all properties from file with -D properties taking precedence -inputhandler <class> the class which will handle input requests - -find <file> search for buildfile towards the root of the - filesystem and use it + -find <file> (s)earch for buildfile towards the root of + -s <file> the filesystem and use it + -nice number A niceness value for the main thread: + 1 (lowest) to 10 (highest); 5 is the default
For more information about -logger
and
-listener
see
diff --git a/src/main/org/apache/tools/ant/Main.java b/src/main/org/apache/tools/ant/Main.java
index b5492dd20..e5fc19780 100644
--- a/src/main/org/apache/tools/ant/Main.java
+++ b/src/main/org/apache/tools/ant/Main.java
@@ -152,6 +152,11 @@ public class Main implements AntMain {
*/
private static boolean isLogFileUsed = false;
+ /**
+ * optional thread priority
+ */
+ private Integer threadPriority=null;
+
/**
* Prints the message of the Throwable if it (the message) is not
* null
.
@@ -434,6 +439,23 @@ public class Main implements AntMain {
}
} else if (arg.equals("-k") || arg.equals("-keep-going")) {
keepGoingMode = true;
+ } else if (arg.equals("-nice")) {
+ try {
+ threadPriority=Integer.decode(args[i + 1]);
+ } catch (ArrayIndexOutOfBoundsException aioobe) {
+ throw new BuildException(
+ "You must supply a niceness value (1-10)"+
+ " after the -nice option");
+ } catch (NumberFormatException e) {
+ throw new BuildException("Unrecognized niceness value: " +
+ args[i + 1]);
+ }
+ i++;
+ if(threadPriority.intValue()