- Notifications
You must be signed in to change notification settings - Fork4.9k
Commita967613
committed
Windows: Make pg_ctl reliably detect service status
pg_ctl is using isatty() to verify whether the process is running in aterminal, and if not it sends its output to Windows' Event Log ... whichdoes the wrong thing when the output has been redirected to a pipe, asreported in bug #13592.To fix, make pg_ctl use the code we already have to detect service-ness:in the master branch, move src/backend/port/win32/security.c to src/port(with suitable tweaks so that it runs properly in backend and frontendenvironments); pg_ctl already has access to pgport so it Just Works. Inolder branches, that's likely to cause trouble, so instead duplicate therequired code in pg_ctl.c.Author: Michael PaquierBug report and diagnosis: Egon KocjanBackpatch: all supported branches1 parentdad0899 commita967613
File tree
5 files changed
+63
-28
lines changed- src
- backend/port/win32
- bin/pg_ctl
- include/port
- port
- tools/msvc
5 files changed
+63
-28
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
| 15 | + | |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
216 | 216 |
| |
217 | 217 |
| |
218 | 218 |
| |
219 |
| - | |
| 219 | + | |
220 | 220 |
| |
221 | 221 |
| |
222 | 222 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
382 | 382 |
| |
383 | 383 |
| |
384 | 384 |
| |
385 |
| - | |
386 |
| - | |
387 |
| - | |
388 | 385 |
| |
389 | 386 |
| |
390 | 387 |
| |
| |||
400 | 397 |
| |
401 | 398 |
| |
402 | 399 |
| |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
403 | 404 |
| |
404 | 405 |
| |
405 | 406 |
| |
|
Lines changed: 56 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 |
| - | |
| 3 | + | |
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| 14 | + | |
14 | 15 |
| |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 |
| |
16 | 20 |
| |
17 | 21 |
| |
18 |
| - | |
19 |
| - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
20 | 45 |
| |
21 | 46 |
| |
22 | 47 |
| |
| |||
40 | 65 |
| |
41 | 66 |
| |
42 | 67 |
| |
43 |
| - | |
44 |
| - | |
| 68 | + | |
| 69 | + | |
45 | 70 |
| |
46 | 71 |
| |
47 | 72 |
| |
48 | 73 |
| |
49 | 74 |
| |
50 | 75 |
| |
51 |
| - | |
| 76 | + | |
52 | 77 |
| |
53 | 78 |
| |
54 | 79 |
| |
| |||
57 | 82 |
| |
58 | 83 |
| |
59 | 84 |
| |
60 |
| - | |
| 85 | + | |
| 86 | + | |
61 | 87 |
| |
62 | 88 |
| |
63 |
| - | |
64 |
| - | |
| 89 | + | |
| 90 | + | |
65 | 91 |
| |
66 | 92 |
| |
67 | 93 |
| |
68 | 94 |
| |
69 |
| - | |
| 95 | + | |
| 96 | + | |
70 | 97 |
| |
71 | 98 |
| |
72 |
| - | |
73 |
| - | |
| 99 | + | |
| 100 | + | |
74 | 101 |
| |
75 | 102 |
| |
76 | 103 |
| |
77 | 104 |
| |
78 | 105 |
| |
79 | 106 |
| |
80 | 107 |
| |
81 |
| - | |
82 |
| - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
83 | 112 |
| |
84 | 113 |
| |
85 | 114 |
| |
| |||
105 | 134 |
| |
106 | 135 |
| |
107 | 136 |
| |
108 |
| - | |
109 |
| - | |
110 |
| - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
111 | 141 |
| |
112 | 142 |
| |
113 | 143 |
| |
| |||
217 | 247 |
| |
218 | 248 |
| |
219 | 249 |
| |
220 |
| - | |
| 250 | + | |
| 251 | + | |
221 | 252 |
| |
222 | 253 |
| |
223 | 254 |
| |
224 | 255 |
| |
225 | 256 |
| |
226 |
| - | |
| 257 | + | |
| 258 | + | |
227 | 259 |
| |
228 | 260 |
| |
229 | 261 |
| |
230 | 262 |
| |
231 | 263 |
| |
232 | 264 |
| |
233 | 265 |
| |
234 |
| - | |
| 266 | + | |
| 267 | + | |
235 | 268 |
| |
236 | 269 |
| |
237 | 270 |
| |
238 | 271 |
| |
239 | 272 |
| |
240 | 273 |
| |
241 | 274 |
| |
242 |
| - | |
| 275 | + | |
| 276 | + | |
243 | 277 |
| |
244 | 278 |
| |
245 | 279 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
90 | 90 |
| |
91 | 91 |
| |
92 | 92 |
| |
93 |
| - | |
| 93 | + | |
94 | 94 |
| |
95 | 95 |
| |
96 | 96 |
| |
|
0 commit comments
Comments
(0)