# Why doesn't System.in.read() block when I'm using Gradle?

**URL:** https://discuss.gradle.org/t/why-doesnt-system-in-read-block-when-im-using-gradle/3308
**Category:** Old Forum Archive
**Created:** [May 10, 2012, 2:17am UTC](https://discuss.gradle.org/t/why-doesnt-system-in-read-block-when-im-using-gradle/3308 "2012-05-10T02:17:00Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![adammurdoch](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/adammurdoch/32/17_2.png) [@adammurdoch](https://discuss.gradle.org/u/adammurdoch)
#### Post date: [May 10, 2012, 5:34am UTC](https://discuss.gradle.org/t/why-doesnt-system-in-read-block-when-im-using-gradle/3308/2 "2012-05-10T05:34:00Z")

</div>

By default the ‘run’ task (and tasks of type ‘JavaExec’ in general) default to using an empty stdin for child processes. If you want the child process to consume from [System.in](http://System.in), you can configure the run task like this:

run {

standardInput = [System.in](http://System.in)

}

---

_[View the full topic](https://discuss.gradle.org/t/why-doesnt-system-in-read-block-when-im-using-gradle/3308)._
