Search code examples
nantfork

What does fork="true" do in nant script targets?


What is the difference between

<target name="target_fork" description="with fork" fork="true">
</target>

and

<target name="target_nofork" description="no fork">
</target>

I always thought it meant that the target would come back and continue execution when it calls other targets or external build files only if fork is true. But some quick nant test scripts are not proving this.


Solution

  • Updated:

    The property fork=true has no effect.

    The term fork usually means that the code you run in a task, not target as you suggest, will execute in a different process (Virtual Machine in Java-lingo).

    It is up to the implementer of a task, for instance NUnit in NAnt or the Java task in ANT, to define meaning of the fork property.