diff options
author | MÃ¥rten Kongstad <marten.kongstad@sonymobile.com> | 2015-03-18 15:18:10 +0100 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-07 05:40:38 -0800 |
commit | f6f4c01bb9a68028ffe452c9c1a611d45098f1ed (patch) | |
tree | 2c2850e344c031f8bf7054e6442417489e90bb6b /cmds/idmap | |
parent | db94a5f9a94701c2cf1e9ca11b858d76f56ac74f (diff) | |
download | frameworks_base-f6f4c01bb9a68028ffe452c9c1a611d45098f1ed.zip frameworks_base-f6f4c01bb9a68028ffe452c9c1a611d45098f1ed.tar.gz frameworks_base-f6f4c01bb9a68028ffe452c9c1a611d45098f1ed.tar.bz2 |
RRO: idmap: allow flock(2) to block
During creation of an idmap an advisory lock is applied on the
output file using flock(2). This commit removes the LOCK_NB flag
from the call to flock(2).
The reason for this is that if the function were to return
EWOULDBLOCK, the entire idmap operation would be aborted leading
to the device booting without the correct overlay packages applied.
Change-Id: Iad319779976e950d4354e4f60b30439f6f208b77
Diffstat (limited to 'cmds/idmap')
-rw-r--r-- | cmds/idmap/create.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/idmap/create.cpp b/cmds/idmap/create.cpp index f706533..dd0554e 100644 --- a/cmds/idmap/create.cpp +++ b/cmds/idmap/create.cpp @@ -42,7 +42,7 @@ namespace { ALOGD("error: fchmod %s: %s\n", path, strerror(errno)); goto fail; } - if (TEMP_FAILURE_RETRY(flock(fd, LOCK_EX | LOCK_NB)) != 0) { + if (TEMP_FAILURE_RETRY(flock(fd, LOCK_EX)) != 0) { ALOGD("error: flock %s: %s\n", path, strerror(errno)); // If the file is locked by another process, then we needn't unlink the file. needUnlink = false; |