Don't use TEMP_FAILURE_RETRY on close in bionic.
Bug: http://b/20501816 Change-Id: Id64b5109cc2b165fa0351b6edbb865a5e5058008 (cherry picked from commit 4e8ef698d0d76be3f8d75de32701e6e6327c1fbd)
This commit is contained in:
parent
ff407803db
commit
fa7ba6227f
@ -86,5 +86,5 @@ __sseek(void *cookie, fpos_t offset, int whence)
|
|||||||
int
|
int
|
||||||
__sclose(void *cookie)
|
__sclose(void *cookie)
|
||||||
{
|
{
|
||||||
return TEMP_FAILURE_RETRY(close(((FILE *)cookie)->_file));
|
return close(((FILE *)cookie)->_file);
|
||||||
}
|
}
|
||||||
|
@ -2429,8 +2429,7 @@ static int nullify_closed_stdio() {
|
|||||||
/* If /dev/null is not one of the stdio file descriptors, close it. */
|
/* If /dev/null is not one of the stdio file descriptors, close it. */
|
||||||
if (dev_null > 2) {
|
if (dev_null > 2) {
|
||||||
TRACE("[ Closing /dev/null file-descriptor=%d]", dev_null);
|
TRACE("[ Closing /dev/null file-descriptor=%d]", dev_null);
|
||||||
status = TEMP_FAILURE_RETRY(close(dev_null));
|
if (close(dev_null) == -1) {
|
||||||
if (status == -1) {
|
|
||||||
DL_ERR("close failed: %s", strerror(errno));
|
DL_ERR("close failed: %s", strerror(errno));
|
||||||
return_value = -1;
|
return_value = -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user