Patches: Browse | Submit New | Admin

[#21779] [Open4] Add Process.detach to ensure

Date:
2008-09-02 20:10
Priority:
3
Submitted By:
PJ Hyett (pjhyett)
Assigned To:
ara howard (ahoward)
Category:
None
State:
Open
Summary:
[Open4] Add Process.detach to ensure

Detailed description
Open4 is used inside of the Grit Ruby library. One of the features of Grit is you're able to define a timeout if the
git command is taking too long:

http://github.com/mojombo/grit/tree/master/lib/grit/git.rb#L71

Unfortunately, when the exception is throw, Process.waitpid2 is never called at the end of the block and many, many
zombies are created.

My one-line patch is to add a Process.detach call in the ensure block to make sure that doesn't happen. I don't know
how terribly useful this is for people outside of Grit, but I thought I'd run it by you.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
assigned_tonone2008-09-02 20:11pjhyett