diff options
author | Declan Conlon <dconlon@atlassian.com> | 2012-10-10 11:34:26 +1100 |
---|---|---|
committer | Declan Conlon <dconlon@atlassian.com> | 2012-10-26 12:06:44 +1100 |
commit | c7c79c83b5a7560df60ba9b4578bbce02514a22a (patch) | |
tree | 6c064a8e2833e0c3d2e58f05a0b19956f572bf7d /test/files | |
parent | 34d021ad2021d3dbedc8b6fe20f7f0f6d1569757 (diff) | |
download | scala-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')
-rw-r--r-- | test/files/run/t6488.check | 1 | ||||
-rw-r--r-- | test/files/run/t6488.scala | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/t6488.check b/test/files/run/t6488.check new file mode 100644 index 0000000000..35821117c8 --- /dev/null +++ b/test/files/run/t6488.check @@ -0,0 +1 @@ +Success 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") + } +} |