- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit76e38b3
committed
windows: Only consider us to be running as service if stderr is invalid.
Previously pgwin32_is_service() would falsely return true when postgres isstarted from somewhere within a service, but not as a service. That ise.g. always the case with windows docker containers, which some CI servicesuse to run windows tests in.When postgres falsely thinks its running as a service, no messages arewritting to stdout / stderr. That can be very confusing and causes a few teststo fail.To fix additionally check if stderr is invalid in pgwin32_is_service(). Forthat to work in backend processes, pg_ctl is changed to pass down handles sothat postgres can do the same check (otherwise "default" handles are created).While this problem exists in all branches, there have been no reports byusers, the prospective CI usage currently is only for master, and I am not awindows expert. So doing the change in only master for now seems the sanestapproach.Author: Andres Freund <andres@anarazel.de>Reviewed-By: Magnus Hagander <magnus@hagander.net>Discussion:https://postgr.es/m/20210305185752.3up5eq2eanb7ofmb@alap3.anarazel.de1 parent6ac763f commit76e38b3
2 files changed
+48
-3
lines changedLines changed: 33 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1737 | 1737 |
| |
1738 | 1738 |
| |
1739 | 1739 |
| |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
1740 | 1765 |
| |
1741 | 1766 |
| |
1742 | 1767 |
| |
| |||
1774 | 1799 |
| |
1775 | 1800 |
| |
1776 | 1801 |
| |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
1777 | 1810 |
| |
1778 | 1811 |
| |
1779 | 1812 |
| |
|
Lines changed: 15 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
95 | 95 |
| |
96 | 96 |
| |
97 | 97 |
| |
98 |
| - | |
99 |
| - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
100 | 103 |
| |
101 | 104 |
| |
102 | 105 |
| |
| |||
121 | 124 |
| |
122 | 125 |
| |
123 | 126 |
| |
| 127 | + | |
124 | 128 |
| |
125 | 129 |
| |
126 | 130 |
| |
127 | 131 |
| |
128 | 132 |
| |
129 |
| - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
130 | 142 |
| |
131 | 143 |
| |
132 | 144 |
| |
|
0 commit comments
Comments
(0)