diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-02-24 15:36:02 +0100 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-03-05 09:40:32 -0800 |
commit | 9179c887cdf0ebc03c87e306cfa1cb99c5da3a88 (patch) | |
tree | 7787ab0d7b9b08e4afbc72396f79c67fa758c3db /src/library/scala/sys/process/ProcessBuilderImpl.scala | |
parent | a8d60a6c76d2d5434148c2d7c8f2bf147855252c (diff) | |
download | scala-9179c887cdf0ebc03c87e306cfa1cb99c5da3a88.tar.gz scala-9179c887cdf0ebc03c87e306cfa1cb99c5da3a88.tar.bz2 scala-9179c887cdf0ebc03c87e306cfa1cb99c5da3a88.zip |
Name boolean arguments in src/library.
Diffstat (limited to 'src/library/scala/sys/process/ProcessBuilderImpl.scala')
-rw-r--r-- | src/library/scala/sys/process/ProcessBuilderImpl.scala | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/library/scala/sys/process/ProcessBuilderImpl.scala b/src/library/scala/sys/process/ProcessBuilderImpl.scala index 49fea6f464..91e267d5e4 100644 --- a/src/library/scala/sys/process/ProcessBuilderImpl.scala +++ b/src/library/scala/sys/process/ProcessBuilderImpl.scala @@ -69,7 +69,7 @@ private[process] trait ProcessBuilderImpl { import io._ // spawn threads that process the input, output, and error streams using the functions defined in `io` - val inThread = Spawn(writeInput(process.getOutputStream), true) + val inThread = Spawn(writeInput(process.getOutputStream), daemon = true) val outThread = Spawn(processOutput(process.getInputStream), daemonizeThreads) val errorThread = if (p.redirectErrorStream) Nil @@ -93,26 +93,26 @@ private[process] trait ProcessBuilderImpl { def #&&(other: ProcessBuilder): ProcessBuilder = new AndBuilder(this, other) def ###(other: ProcessBuilder): ProcessBuilder = new SequenceBuilder(this, other) - def run(): Process = run(false) + def run(): Process = run(connectInput = false) def run(connectInput: Boolean): Process = run(BasicIO.standard(connectInput)) - def run(log: ProcessLogger): Process = run(log, false) + def run(log: ProcessLogger): Process = run(log, connectInput = false) def run(log: ProcessLogger, connectInput: Boolean): Process = run(BasicIO(connectInput, log)) - def !! = slurp(None, false) - def !!(log: ProcessLogger) = slurp(Some(log), false) - def !!< = slurp(None, true) - def !!<(log: ProcessLogger) = slurp(Some(log), true) + def !! = slurp(None, withIn = false) + def !!(log: ProcessLogger) = slurp(Some(log), withIn = false) + def !!< = slurp(None, withIn = true) + def !!<(log: ProcessLogger) = slurp(Some(log), withIn = true) - def lines: Stream[String] = lines(false, true, None) - def lines(log: ProcessLogger): Stream[String] = lines(false, true, Some(log)) - def lines_! : Stream[String] = lines(false, false, None) - def lines_!(log: ProcessLogger): Stream[String] = lines(false, false, Some(log)) + def lines: Stream[String] = lines(withInput = false, nonZeroException = true, None) + def lines(log: ProcessLogger): Stream[String] = lines(withInput = false, nonZeroException = true, Some(log)) + def lines_! : Stream[String] = lines(withInput = false, nonZeroException = false, None) + def lines_!(log: ProcessLogger): Stream[String] = lines(withInput = false, nonZeroException = false, Some(log)) - def ! = run(false).exitValue() + def ! = run(connectInput = false).exitValue() def !(io: ProcessIO) = run(io).exitValue() - def !(log: ProcessLogger) = runBuffered(log, false) - def !< = run(true).exitValue() - def !<(log: ProcessLogger) = runBuffered(log, true) + def !(log: ProcessLogger) = runBuffered(log, connectInput = false) + def !< = run(connectInput = true).exitValue() + def !<(log: ProcessLogger) = runBuffered(log, connectInput = true) /** Constructs a new builder which runs this command with all input/output threads marked * as daemon threads. This allows the creation of a long running process while still |