causes other tasks to hang or leads to strange behaviour of tasks

  • Share
  • Share

Applies to:
Ant

Description:
Occurs while using Apache Ant.

Cause:
You have used which caused strange behaviour of
tasks.

JAVA-Tools

  1. admin
    March 20th, 2009 at 10:28 | #1

    When Ant forks a new process for example by using the , or tasks, it will also start a new thread reading from standard input and sending everything that it has read to that process.
    Unfortunately Ant has no way to know whether the forked process is ever going to read any input, so it will start such a thread even if the process doesn’t need one.
    This behaviour leads to strange side effects like the Ant process being suspended when a build forking new process is run as a background process on Unix-like systems or
    tasks requiring additional inputs if they come after an task.
    Fortunately there is a workaround for this, always specify inputstring=”" for any
    task (or one of its sibblings) if you know the forked process doesn’t consume any input.

  1. No trackbacks yet.