mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-03-17 21:18:00 +02:00
Use lockf on XLC.
This commit is contained in:
parent
25445d9993
commit
f7d1da953e
@ -43,7 +43,11 @@ catalog_lock(void)
|
||||
elog(errno == ENOENT ? ERROR : ERROR,
|
||||
"cannot open file \"%s\": %s", id_path, strerror(errno));
|
||||
|
||||
#ifdef __IBMC__
|
||||
ret = lockf(lock_fd, LOCK_EX | LOCK_NB, 0); /* non-blocking */
|
||||
#else
|
||||
ret = flock(lock_fd, LOCK_EX | LOCK_NB); /* non-blocking */
|
||||
#endif
|
||||
if (ret == -1)
|
||||
{
|
||||
if (errno == EWOULDBLOCK)
|
||||
|
Loading…
x
Reference in New Issue
Block a user