diff options
author | Paul Phillips <paulp@improving.org> | 2011-02-12 20:08:21 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-02-12 20:08:21 +0000 |
commit | 1c5d8d2e689769cbd5aa106cacb8b3c3af0c0451 (patch) | |
tree | d199a39086ff0a5dbe7b7da240bbca772a97ec88 /src/library/scala/sys/process/ProcessBuilder.scala | |
parent | 02fd6b6139dce48fffe46785fb6b588690885b26 (diff) | |
download | scala-1c5d8d2e689769cbd5aa106cacb8b3c3af0c0451.tar.gz scala-1c5d8d2e689769cbd5aa106cacb8b3c3af0c0451.tar.bz2 scala-1c5d8d2e689769cbd5aa106cacb8b3c3af0c0451.zip |
Fixed all the forms of process input/output red...
Fixed all the forms of process input/output redirection so the exit code
which makes it out is the exit code of the process. Also changing names
to be internally consistent and trying to prune pieces which don't make
so much sense without sbt around. Started on documentation. No review.
Diffstat (limited to 'src/library/scala/sys/process/ProcessBuilder.scala')
-rw-r--r-- | src/library/scala/sys/process/ProcessBuilder.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/library/scala/sys/process/ProcessBuilder.scala b/src/library/scala/sys/process/ProcessBuilder.scala index bdd13f11af..0e34e7be1b 100644 --- a/src/library/scala/sys/process/ProcessBuilder.scala +++ b/src/library/scala/sys/process/ProcessBuilder.scala @@ -71,7 +71,16 @@ trait ProcessBuilder extends Source with Sink { /** Constructs a command that will run this command and then `other`. The exit code will be the exit code of `other`.*/ def ### (other: ProcessBuilder): ProcessBuilder + /** True if this command can be the target of a pipe. + */ def canPipeTo: Boolean + + /** True if this command has an exit code which should be propagated to the user. + * Given a pipe between A and B, if B.hasExitValue is true then the exit code will + * be the one from B; if it is false, the one from A. This exists to prevent output + * redirections (implemented as pipes) from masking useful process error codes. + */ + def hasExitValue: Boolean } object ProcessBuilder extends ProcessBuilderImpl { |