don't leak fds for mbox sources
authorSascha Silbe <sascha-pgp@silbe.org>
Tue, 18 Jan 2011 17:59:33 +0000 (18:59 +0100)
committerRich Lane <rlane@club.cc.cmu.edu>
Wed, 19 Jan 2011 03:21:15 +0000 (19:21 -0800)
commitf7f1f6e0600b52c03ab4a513b2ff14921ff3f58b
tree63522dca162c5a94590f286b464bb4ba1152bae7
parent54d1a882de37495473c336ed286f6d3b8bd6ee1b
don't leak fds for mbox sources

Only open the mbox when it's actually used and close it again once we're
finished iterating over it.

Adds a method go_idle to Source to inform the source we're unlikely to
use it in the near future so it can do internal clean-up as appropriate.

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
lib/sup/mbox.rb
lib/sup/poll.rb
lib/sup/source.rb