Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.1.3
-
Fix Version/s: JRuby 1.2
-
Component/s: Core Classes/Modules
-
Labels:None
Description
No clear explanation for this one yet, but the following code will hang:
io = IO.popen('yes', 'r')
io.close
Basically we wait on the process when closing, but something's missing to signal the 'yes' process that it should terminate. This lead to some specs hanging (tagged as failures for now).
Oddly enough, we were just missing a Process.destroy call to shut 'er down. So I improved PopenProcess.destroy to both destroy the actual process as well as closing streams/channels and quitting the pumpers. It didn't appear to quit the pumpers at all before, so that was a potential thread leak.