summaryrefslogtreecommitdiff
path: root/src/port
diff options
context:
space:
mode:
authorNoah Misch2019-04-04 00:11:16 +0000
committerNoah Misch2019-04-04 00:11:16 +0000
commitab9ed9be2378f02edf613e0543a29287e7484338 (patch)
tree6ca051bb83504e1c5e1023c4c200c5f6471d6b99 /src/port
parentf433394e48afbb733b1436276a5a08cd78443164 (diff)
Assert that pgwin32_signal_initialize() has been called early enough.
Before the pgwin32_signal_initialize() call, the backend version of pg_usleep() has no effect. No in-tree code falls afoul of that today, but temporary commit 23078689a9921968ac0873b017be6e7f772f10bc did so. Discussion: https://postgr.es/m/20190402135442.GA1173872@rfd.leadboat.com
Diffstat (limited to 'src/port')
-rw-r--r--src/port/open.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/port/open.c b/src/port/open.c
index 436cbae4826..f37afc75121 100644
--- a/src/port/open.c
+++ b/src/port/open.c
@@ -70,6 +70,9 @@ pgwin32_open(const char *fileName, int fileFlags,...)
(O_RANDOM | O_SEQUENTIAL | O_TEMPORARY) |
_O_SHORT_LIVED | O_DSYNC | O_DIRECT |
(O_CREAT | O_TRUNC | O_EXCL) | (O_TEXT | O_BINARY))) == fileFlags);
+#ifndef FRONTEND
+ Assert(pgwin32_signal_event != NULL); /* small chance of pg_usleep() */
+#endif
#ifdef FRONTEND