diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-04-01 16:39:29 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-04-01 16:39:29 +0000 |
commit | 954dfd389fb1c672323abf985b761ec3f33640d6 (patch) | |
tree | 63086a9017219ea73b37869938e28202fb713fc3 | |
parent | e40b8d042eb6de5a85307b42d830ad1072fd5e99 (diff) | |
download | nginx-954dfd389fb1c672323abf985b761ec3f33640d6.tar.gz |
r2564 merge:
compatibility with Tru64 UNIX: fcntl(F_SETLK, F_WRLCK) returns EINVAL if busy
-rw-r--r-- | src/core/ngx_shmtx.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/core/ngx_shmtx.h b/src/core/ngx_shmtx.h index e6fb6aa31..57fe0b9f5 100644 --- a/src/core/ngx_shmtx.h +++ b/src/core/ngx_shmtx.h @@ -57,7 +57,15 @@ ngx_shmtx_trylock(ngx_shmtx_t *mtx) return 0; } - ngx_log_abort(err, ngx_trylock_fd_n " failed"); +#if __osf__ /* Tru64 UNIX */ + + if (err == NGX_EACCESS) { + return 0; + } + +#endif + + ngx_log_abort(err, ngx_trylock_fd_n " %s failed", mtx->name); return 0; } @@ -74,7 +82,7 @@ ngx_shmtx_lock(ngx_shmtx_t *mtx) return; } - ngx_log_abort(err, ngx_lock_fd_n " failed"); + ngx_log_abort(err, ngx_lock_fd_n " %s failed", mtx->name); } @@ -89,7 +97,7 @@ ngx_shmtx_unlock(ngx_shmtx_t *mtx) return; } - ngx_log_abort(err, ngx_unlock_fd_n " failed"); + ngx_log_abort(err, ngx_unlock_fd_n " %s failed", mtx->name); } |