forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb0bea38
committed
Use FD_CLOEXEC on ListenSockets
It's good hygiene if e.g. an extension launches a subprogram whenbeing loaded. We went through some effort to close them in the childprocess in EXEC_BACKEND mode, but it's better to not hand them down tothe child process in the first place. We still need to close themafter fork when !EXEC_BACKEND, but it's a little simpler.In the passing, LOG a message if closing the client connection orlisten socket fails. Shouldn't happen, but if it does, would be niceto know.Reviewed-by: Tristan Partin, Andres Freund, Thomas MunroDiscussion:https://www.postgresql.org/message-id/7a59b073-5b5b-151e-7ed3-8b01ff7ce9ef@iki.fi1 parentd71e605 commitb0bea38
2 files changed
+11
-9
lines changedLines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
458 | 458 |
| |
459 | 459 |
| |
460 | 460 |
| |
| 461 | + | |
| 462 | + | |
| 463 | + | |
461 | 464 |
| |
462 | 465 |
| |
463 | 466 |
| |
| |||
831 | 834 |
| |
832 | 835 |
| |
833 | 836 |
| |
834 |
| - | |
| 837 | + | |
| 838 | + | |
835 | 839 |
| |
836 | 840 |
| |
837 | 841 |
| |
|
Lines changed: 6 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
496 | 496 |
| |
497 | 497 |
| |
498 | 498 |
| |
499 |
| - | |
500 | 499 |
| |
501 | 500 |
| |
502 | 501 |
| |
| |||
2545 | 2544 |
| |
2546 | 2545 |
| |
2547 | 2546 |
| |
2548 |
| - | |
2549 |
| - | |
2550 | 2547 |
| |
2551 | 2548 |
| |
2552 | 2549 |
| |
| |||
2573 | 2570 |
| |
2574 | 2571 |
| |
2575 | 2572 |
| |
| 2573 | + | |
| 2574 | + | |
| 2575 | + | |
2576 | 2576 |
| |
2577 |
| - | |
| 2577 | + | |
| 2578 | + | |
2578 | 2579 |
| |
2579 | 2580 |
| |
2580 | 2581 |
| |
2581 | 2582 |
| |
2582 | 2583 |
| |
2583 | 2584 |
| |
2584 | 2585 |
| |
| 2586 | + | |
2585 | 2587 |
| |
2586 | 2588 |
| |
2587 | 2589 |
| |
| |||
6038 | 6040 |
| |
6039 | 6041 |
| |
6040 | 6042 |
| |
6041 |
| - | |
6042 |
| - | |
6043 | 6043 |
| |
6044 | 6044 |
| |
6045 | 6045 |
| |
| |||
6271 | 6271 |
| |
6272 | 6272 |
| |
6273 | 6273 |
| |
6274 |
| - | |
6275 |
| - | |
6276 | 6274 |
| |
6277 | 6275 |
| |
6278 | 6276 |
| |
|
0 commit comments
Comments
(0)