forked from scala/scala
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SI-6488: Stop I/O threads prior to Process destruction
- Loading branch information
Declan Conlon
committed
Oct 26, 2012
1 parent
34d021a
commit c7c79c8
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import sys.process._ | ||
object Test { | ||
// Program that prints "Success" if the command was successfully run then destroyed | ||
// It will silently pass if the command "/bin/ls" does not exist | ||
// It will fail due to the uncatchable exception in t6488 race condition | ||
def main(args: Array[String]) { | ||
try Process("/bin/ls").run(ProcessLogger { _ => () }).destroy | ||
catch { case _ => () } | ||
println("Success") | ||
} | ||
} |