Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running process with input redirection hangs forever #10007

Closed
scabug opened this issue Oct 25, 2016 · 2 comments
Closed

Running process with input redirection hangs forever #10007

scabug opened this issue Oct 25, 2016 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Oct 25, 2016

This code works fine in 2.11.8 but hangs in 2.12.0-RC2:

import java.io._
import scala.sys.process._
("echo" #< new ByteArrayInputStream("lol\n".getBytes)).!!
@scabug
Copy link
Author

scabug commented Oct 25, 2016

Imported From: https://issues.scala-lang.org/browse/SI-10007?orig=1
Reporter: @ghik
Affected Versions: 2.12.0-RC2
See #8768

@scabug
Copy link
Author

scabug commented Oct 26, 2016

@som-snytt said:
This commit changed SyncVar.set to SyncVar.put without regard to semantics.

scala/scala@67b3b9d

Trying to put twice without any takers will hang.

But kicking off threads in REPL without taking precautions is prone to deadlock, so that might contribute to how you observe the hang. For me, that started in 2.12.0-M2, when lambda switch was thrown, IIUC.

scala/scala#5481

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants