- Notifications
You must be signed in to change notification settings - Fork28
Commit125f551
committed
Leave SIGTTIN/SIGTTOU signal handling alone in postmaster child processes.
For reasons lost in the mists of time, most postmaster child processesreset SIGTTIN/SIGTTOU signal handling to SIG_DFL, with the major exceptionthat backend sessions do not. It seems like a pretty bad idea for anypostmaster children to do that: if stderr is connected to the terminal,and the user has put the postmaster in background, any log output wouldresult in the child process freezing up. Hence, switch them all todoing what backends do, ie, nothing. This allows them to inherit thepostmaster's SIG_IGN setting. On the other hand, manually-launchedprocesses such as standalone backends will have default processing,which seems fine.In passing, also remove useless resets of SIGCONT and SIGWINCH signalprocessing. Perhaps the postmaster once changed those to somethingbesides SIG_DFL, but it doesn't now, so these are just wasted (andconfusing) syscalls.Basically, this propagates the changes made in commit8e2998d frombackends to other postmaster children. Probably the only reason thesecalls now exist elsewhere is that I missed changing pgstat.c along withpostgres.c at the time.Given the lack of field complaints that can be traced to this, I don'tpresently feel a need to back-patch.Discussion:https://postgr.es/m/5627.1542477392@sss.pgh.pa.us1 parent7361612 commit125f551
File tree
10 files changed
+11
-36
lines changed- src/backend
- postmaster
- replication
10 files changed
+11
-36
lines changedLines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
133 | 133 |
| |
134 | 134 |
| |
135 | 135 |
| |
136 |
| - | |
137 |
| - | |
138 |
| - | |
139 |
| - | |
140 | 136 |
| |
141 | 137 |
| |
142 | 138 |
| |
|
Lines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
218 | 218 |
| |
219 | 219 |
| |
220 | 220 |
| |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 | 221 |
| |
226 | 222 |
| |
227 | 223 |
| |
|
Lines changed: 1 addition & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
226 | 226 |
| |
227 | 227 |
| |
228 | 228 |
| |
| 229 | + | |
229 | 230 |
| |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 |
| - | |
234 | 231 |
| |
235 | 232 |
| |
236 | 233 |
| |
|
Lines changed: 1 addition & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4267 | 4267 |
| |
4268 | 4268 |
| |
4269 | 4269 |
| |
| 4270 | + | |
4270 | 4271 |
| |
4271 |
| - | |
4272 |
| - | |
4273 |
| - | |
4274 |
| - | |
4275 | 4272 |
| |
4276 | 4273 |
| |
4277 | 4274 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
646 | 646 |
| |
647 | 647 |
| |
648 | 648 |
| |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
649 | 657 |
| |
650 | 658 |
| |
| 659 | + | |
651 | 660 |
| |
652 | 661 |
| |
653 | 662 |
| |
|
Lines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
188 | 188 |
| |
189 | 189 |
| |
190 | 190 |
| |
191 |
| - | |
192 |
| - | |
193 |
| - | |
194 |
| - | |
195 | 191 |
| |
196 | 192 |
| |
197 | 193 |
| |
|
Lines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
257 | 257 |
| |
258 | 258 |
| |
259 | 259 |
| |
260 |
| - | |
261 |
| - | |
262 |
| - | |
263 |
| - | |
264 | 260 |
| |
265 | 261 |
| |
266 | 262 |
| |
|
Lines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
124 |
| - | |
125 |
| - | |
126 |
| - | |
127 |
| - | |
128 | 124 |
| |
129 | 125 |
| |
130 | 126 |
| |
|
Lines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
279 | 279 |
| |
280 | 280 |
| |
281 | 281 |
| |
282 |
| - | |
283 |
| - | |
284 |
| - | |
285 |
| - | |
286 | 282 |
| |
287 | 283 |
| |
288 | 284 |
| |
|
Lines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3003 | 3003 |
| |
3004 | 3004 |
| |
3005 | 3005 |
| |
3006 |
| - | |
3007 |
| - | |
3008 |
| - | |
3009 |
| - | |
3010 | 3006 |
| |
3011 | 3007 |
| |
3012 | 3008 |
| |
|
0 commit comments
Comments
(0)