Closed remen closed 9 years ago
I'm sorry to say that I've left ruby development behind me at the moment, so this project is more or less abandoned. I would be very happy to give the ownership to someone else. Are you interested?
This is not trivial, the source of the EOF exception is here in the fork gem and when it arrives at fork_break you can no longer know what happened.
I've already investigated this issue in the past and found no good solution, here's the test I've added in my local fork_break clone in order to tackle this issue:
it "raises the process exception" do
class MyError < StandardError; end
process = ForkBreak::Process.new do
raise MyError
end
expect { process.finish.wait }.to raise_error(MyError)
end
If anyone has a good idea I can try and help/review/test/use the code.
Yeah, I don't manage to come up with a good solution either. For my purposes it was enough to wrap the entire fork in a begin rescue block and print the stack trace but that's far from ideal.
@remen Sorry, probably not. Hopefully this project finds a maintainer though. It's been really helpful for integration testing my race condition.
@pedrocarrico Maybe the block could be wrapped in a begin rescue and then the exception message, class and trace sent by some kind of inter-process communication and recreated/raised on the parent process?
@D1plo1d Yeah that was what I was thinking but at the moment I don't know how fork is structured to do that or if it's even possible.
@remen I can freshen up the repo a bit, perhaps update the gem dependencies (and lock them), do an update to latest rspec, perhaps put up travis build, set up some badges, deal with issue #2, perhaps with all that we can get some more attention to the project and some more collaborators, what do you think?
I also use fork_break extensively at work so I would hate to see it abandoned.
Well...actually nothing like RTFD (D for documentation on the Fork gem)...I'll put up a pull request for this ASAP.
@pedrocarrico wow, such a simple fix! A+ reading of manuals. Cheers! :)
Awesome. Well done!
@pedrocarrico Added you as collaborator. If you want me to review code before merging, ping me.
running into the same issue. I would love it if fork_break could surface more useful errors.