forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd4a43b2
committed
Convert libpgport's pqsignal() to a void function.
The protections added by commit3b00fdb introduced raceconditions to this function that can lead to bogus return values.Since nobody seems to inspect the return value, this is of littleconsequence, but it would have been nice to convert it to a voidfunction to avoid any possibility of a bogus return value. Ioriginally thought that doing so would have required also modifyinglegacy-pqsignal.c's version of the function (which would'verequired an SONAME bump), but commit9a45a89 gavelegacy-pqsignal.c its own dedicated extern for pqsignal(), therebydecoupling it enough that libpgport's pqsignal() can be modified.This commit also adds an assertion for the return value ofsigaction()/signal(). Since a failure most likely indicates acoding error, and nobody has ever bothered to check pqsignal()'sreturn value, it's probably not worth the effort to do anythingfancier.Reviewed-by: Tom LaneDiscussion:https://postgr.es/m/Z4chOKfnthRH71mw%40nathan1 parent5cda4fd commitd4a43b2
2 files changed
+7
-29
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
520 | 520 |
| |
521 | 521 |
| |
522 | 522 |
| |
523 |
| - | |
| 523 | + | |
524 | 524 |
| |
525 | 525 |
| |
526 | 526 |
| |
|
Lines changed: 6 additions & 28 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
112 | 112 |
| |
113 | 113 |
| |
114 | 114 |
| |
115 |
| - | |
116 |
| - | |
117 |
| - | |
118 |
| - | |
119 |
| - | |
120 |
| - | |
121 |
| - | |
122 |
| - | |
123 |
| - | |
124 |
| - | |
125 |
| - | |
126 |
| - | |
127 | 115 |
| |
128 | 116 |
| |
129 | 117 |
| |
130 | 118 |
| |
131 |
| - | |
| 119 | + | |
132 | 120 |
| |
133 | 121 |
| |
134 |
| - | |
135 | 122 |
| |
136 |
| - | |
137 |
| - | |
138 |
| - | |
139 |
| - | |
| 123 | + | |
140 | 124 |
| |
141 | 125 |
| |
142 | 126 |
| |
| |||
155 | 139 |
| |
156 | 140 |
| |
157 | 141 |
| |
158 |
| - | |
159 |
| - | |
160 |
| - | |
161 |
| - | |
162 |
| - | |
163 |
| - | |
| 142 | + | |
| 143 | + | |
164 | 144 |
| |
165 | 145 |
| |
166 |
| - | |
167 |
| - | |
168 |
| - | |
169 |
| - | |
| 146 | + | |
| 147 | + | |
170 | 148 |
| |
171 | 149 |
|
0 commit comments
Comments
(0)