Bug 58376 - On windows when using headfilter with exec, ant hangs.
Summary: On windows when using headfilter with exec, ant hangs.
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.9.4
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
Depends on:
Reported: 2015-09-12 02:35 UTC by Daniel Friederich
Modified: 2015-09-12 02:38 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Friederich 2015-09-12 02:35:24 UTC
I run some external process which occasionally prints a lot to the stdout.
In order to avoid to generate huge build output files, I wanted to limit the output which gets generated to some maximum. However when trying this, the
executed process hangs, never terminates. 
Without the headfilter (or with the headfilter and lines="-1") the execution terminates quickly.

  <target name="t">
    <echo message="starting cmd.exe" />
    <exec executable="cmd.exe">
    <arg value="/c"/>
      <arg value="type"/>
      <arg value="build.xml"/>
          <headfilter lines="-1"/>
    <echo message="bug: never get here" />

This is on Windows 10 (not sure it matters)
Comment 1 Daniel Friederich 2015-09-12 02:38:52 UTC
To reproduce the bug, use 
<headfilter lines="10"/>

(and not -1, with -1 it ends quickly)