diff options
author | Matthew D. Fuller <fullermd@over-yonder.net> | 2011-09-05 10:31:14 -0500 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-09-20 17:52:43 -0700 |
commit | 5c01ef69eee7dfe925c97558153fcd5e116252c6 (patch) | |
tree | 09bf04c120b0da64e64ba16b625efadfbf8a44f9 | |
parent | 8fd15eb0149cec75d69a27b1f8ec3ce092465b80 (diff) |
Improve the handling of "normal" locking collisions.
EEXIST is a perfectly normal and expected errno for open(O_CREAT |
O_EXCL), and is a signal to loop around and retry, not return with an
error.
Signed-off-by: Matthew D. Fuller <fullermd@over-yonder.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | AuLock.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -81,7 +81,7 @@ long dead) if (creat_fd == -1) { creat_fd = open (creat_name, O_WRONLY | O_CREAT | O_EXCL, 0600); if (creat_fd == -1) { - if (errno != EACCES) + if (errno != EACCES && errno != EEXIST) return LOCK_ERROR; } else (void) close (creat_fd); |