summaryrefslogtreecommitdiff
path: root/test/files/run/t6488.scala
diff options
context:
space:
mode:
authorDeclan Conlon <dconlon@atlassian.com>2012-10-10 11:34:26 +1100
committerDeclan Conlon <dconlon@atlassian.com>2012-10-26 12:06:44 +1100
commitc7c79c83b5a7560df60ba9b4578bbce02514a22a (patch)
tree6c064a8e2833e0c3d2e58f05a0b19956f572bf7d /test/files/run/t6488.scala
parent34d021ad2021d3dbedc8b6fe20f7f0f6d1569757 (diff)
downloadscala-c7c79c83b5a7560df60ba9b4578bbce02514a22a.tar.gz
scala-c7c79c83b5a7560df60ba9b4578bbce02514a22a.tar.bz2
scala-c7c79c83b5a7560df60ba9b4578bbce02514a22a.zip
SI-6488: Stop I/O threads prior to Process destruction
Diffstat (limited to 'test/files/run/t6488.scala')
-rw-r--r--test/files/run/t6488.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/t6488.scala b/test/files/run/t6488.scala
new file mode 100644
index 0000000000..487614ecfd
--- /dev/null
+++ b/test/files/run/t6488.scala
@@ -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")
+ }
+}