mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
pg_alterckey: adjust doc build and Win32 sleep/open build fails
Fix for commit 62afb42a7f. Reported-by: Tom Lane Discussion: https://postgr.es/m/1252111.1608953815@sss.pgh.pa.us Backpatch-through: master
This commit is contained in:
parent
7705f8ca03
commit
82f8c45be5
@ -189,6 +189,7 @@ Complete list of usable sgml source files in this directory.
|
|||||||
<!ENTITY values SYSTEM "values.sgml">
|
<!ENTITY values SYSTEM "values.sgml">
|
||||||
|
|
||||||
<!-- applications and utilities -->
|
<!-- applications and utilities -->
|
||||||
|
<!ENTITY pgalterckey SYSTEM "pg_alterckey.sgml">
|
||||||
<!ENTITY clusterdb SYSTEM "clusterdb.sgml">
|
<!ENTITY clusterdb SYSTEM "clusterdb.sgml">
|
||||||
<!ENTITY createdb SYSTEM "createdb.sgml">
|
<!ENTITY createdb SYSTEM "createdb.sgml">
|
||||||
<!ENTITY createuser SYSTEM "createuser.sgml">
|
<!ENTITY createuser SYSTEM "createuser.sgml">
|
||||||
|
@ -343,16 +343,17 @@ create_lockfile(void)
|
|||||||
unlink(pid_path);
|
unlink(pid_path);
|
||||||
|
|
||||||
/* Sleep to reduce the likelihood of concurrent unlink */
|
/* Sleep to reduce the likelihood of concurrent unlink */
|
||||||
sleep(2);
|
pg_usleep(2000000L); /* 2 seconds */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create our own lockfile? */
|
/* Create our own lockfile? */
|
||||||
lock_fd = open(pid_path, O_RDWR | O_CREAT | O_EXCL
|
#ifndef WIN32
|
||||||
#ifdef WIN32
|
lock_fd = open(pid_path, O_RDWR | O_CREAT | O_EXCL, pg_file_create_mode);
|
||||||
|
#else
|
||||||
/* delete on close */
|
/* delete on close */
|
||||||
| O_TEMPORARY
|
lock_fd = open(pid_path, O_RDWR | O_CREAT | O_EXCL | O_TEMPORARY,
|
||||||
|
pg_file_create_mode);
|
||||||
#endif
|
#endif
|
||||||
, pg_file_create_mode);
|
|
||||||
|
|
||||||
if (lock_fd == -1)
|
if (lock_fd == -1)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user