summaryrefslogtreecommitdiff
path: root/test/files/run/t6488.scala
diff options
context:
space:
mode:
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")
+ }
+}