forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitada8fa0
committed
Fix Windows implementation of PGSemaphoreLock.
The original coding failed to reset ImmediateInterruptOK before returning,which would potentially allow a subsequent query-cancel interrupt to beaccepted at an unsafe point. This is a really nasty bug since it's so hardto predict the consequences, but they could be unpleasant.Also, ensure that signal handlers are serviced before this functionreturns, even if the semaphore is already set. This should make thebehavior more like Unix.Back-patch to all supported versions.1 parent8ebc908 commitada8fa0
1 file changed
+12
-8
lines changedLines changed: 12 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
124 |
| - | |
125 |
| - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
126 | 131 |
| |
127 | 132 |
| |
128 | 133 |
| |
| |||
135 | 140 |
| |
136 | 141 |
| |
137 | 142 |
| |
138 |
| - | |
139 | 143 |
| |
140 | 144 |
| |
141 | 145 |
| |
142 |
| - | |
143 |
| - | |
144 |
| - | |
145 |
| - | |
146 |
| - | |
147 | 146 |
| |
148 | 147 |
| |
149 | 148 |
| |
150 | 149 |
| |
151 | 150 |
| |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
152 | 156 |
| |
153 | 157 |
| |
154 | 158 |
| |
|
0 commit comments
Comments
(0)