forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit14ddff4
committed
Assert that WaitLatch's timeout is not more than INT_MAX milliseconds.
The behavior with larger values is unspecified by the Single Unix Spec.It appears that BSD-derived kernels report EINVAL, although Linux does not.If waiting for longer intervals is desired, the calling code has to dosomething to limit the delay; we can't portably fix it here since "long"may not be any wider than "int" in the first place.Part of response to bug #7670, though this change doesn't fix that(in fact, it converts the problem from an ERROR into an Assert failure).No back-patch since it's just an assertion addition.1 parent6b6633a commit14ddff4
2 files changed
+8
-5
lines changedLines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| 36 | + | |
36 | 37 |
| |
37 | 38 |
| |
38 | 39 |
| |
| |||
176 | 177 |
| |
177 | 178 |
| |
178 | 179 |
| |
179 |
| - | |
180 |
| - | |
181 |
| - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
182 | 184 |
| |
183 | 185 |
| |
184 | 186 |
| |
| |||
243 | 245 |
| |
244 | 246 |
| |
245 | 247 |
| |
246 |
| - | |
| 248 | + | |
247 | 249 |
| |
248 | 250 |
| |
249 | 251 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
| 23 | + | |
23 | 24 |
| |
24 | 25 |
| |
25 | 26 |
| |
| |||
130 | 131 |
| |
131 | 132 |
| |
132 | 133 |
| |
133 |
| - | |
| 134 | + | |
134 | 135 |
| |
135 | 136 |
| |
136 | 137 |
| |
|
0 commit comments
Comments
(0)