Skip to content

Commit f7d1da9

Browse files
committed
Use lockf on XLC.
1 parent 25445d9 commit f7d1da9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

catalog.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ catalog_lock(void)
4343
elog(errno == ENOENT ? ERROR : ERROR,
4444
"cannot open file \"%s\": %s", id_path, strerror(errno));
4545

46+
#ifdef __IBMC__
47+
ret = lockf(lock_fd, LOCK_EX | LOCK_NB, 0); /* non-blocking */
48+
#else
4649
ret = flock(lock_fd, LOCK_EX | LOCK_NB); /* non-blocking */
50+
#endif
4751
if (ret == -1)
4852
{
4953
if (errno == EWOULDBLOCK)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy