]> Sergey Matveev's repositories - public-inbox.git/commit
reduce calls to close unless error checks are needed
authorEric Wong <e@80x24.org>
Sun, 28 Feb 2016 11:28:33 +0000 (11:28 +0000)
committerEric Wong <e@80x24.org>
Sun, 28 Feb 2016 11:30:33 +0000 (11:30 +0000)
commit2ac2023fa416e31189708c355db8728abbd9ef2c
tree4d9eed94def3dfc7b6d7c0c5cb86bb734c84173c
parent8f090c1ff5e4eea068f20b30f1f79144aae936a3
reduce calls to close unless error checks are needed

We can rely on timely auto-destruction based on reference
counting; reducing the chance of redundant close(2) calls
which may hit the wront FD.

We do care about certain close calls (e.g. writing to a buffered
IO handle) if we require error-checking for write-integrity.  In
other cases, let things go out-of-scope so it can be freed
automatically after use.
lib/PublicInbox/Config.pm
lib/PublicInbox/Feed.pm
lib/PublicInbox/Git.pm
lib/PublicInbox/ProcessPipe.pm
lib/PublicInbox/SearchIdx.pm
lib/PublicInbox/Spawn.pm