Commit graph

5 commits

Author SHA1 Message Date
Josh Gao
4956c372cf Move bionic_macros.h from private to platform.
Test: treehugger
Change-Id: Ie473914f4c8924c7240b3ac22093a9daf42fc948
2020-01-02 14:09:50 -08:00
Johan Harvyl
89b09198b9 Close descriptor in ScopeFd destructor
The underlying descriptor is supposed to be closed when the ScopedFd
goes out of scope but due to a typo in reset() that never happens.

This change was inspired by an earlier implementation of ScopedFd in:
04dc91ae7 Load library using file handle.

Issue: 143918215
Test: Manual (verify fd usage on device)
Change-Id: I5664fa82d3e732113732e34a7ae6df3ca79d3cee
2019-11-05 12:20:23 +01:00
Elliott Hughes
6cb70ad776 Add the ScopedFd that we've never quite gotten around to.
This is actually for the new change I'm working on, but let's retrofit
it first to separate any bugs in these changes from those in the new
change...

Test: treehugger
Change-Id: I890aeb61f9792810a77ad0da3f9674c9cc5db7bb
2019-10-31 21:16:18 -07:00
Spencer Low
0346ad7a4f ScopedFd: Don't use TEMP_FAILURE_RETRY() with close()
According to the comments in Posix_close(), TEMP_FAILURE_RETRY() should
not be used with close():

462bdac45c%5E%21/#F12

Kill ScopedFd by simplifying the single caller.

Change-Id: I248c40b8c2fc95f1938a6edfc245c81847fc44af
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-05-13 13:27:11 -07:00
Dmitriy Ivanov
04dc91ae76 Load library using file handle.
* This patch enables dlopen by file descriptor
   instead of path/name.

Bug: 15984217
Change-Id: Ib39051e00567fb97070bf96d8ce63993877c0a01
2014-07-02 13:20:47 -07:00