forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita73d083
committed
Modernize our code for looking up descriptive strings for Unix signals.
At least as far back as the 2008 spec, POSIX has defined strsignal(3)for looking up descriptive strings for signal numbers. We hadn't gottenthe word though, and were still using the crufty old sys_siglist array,which is in no standard even though most Unixen provide it.Aside from not being formally standards-compliant, this was just plainugly because it involved #ifdef's at every place using the code.To eliminate the #ifdef's, create a portability function pg_strsignal,which wraps strsignal(3) if available and otherwise falls back tosys_siglist[] if available. The set of Unixen with neither API isprobably empty these days, but on any platform with neither, you'lljust get "unrecognized signal". All extant callers print the numericsignal number too, so no need to work harder than that.Along the way, upgrade pg_basebackup's child-error-exit reportingto match the rest of the system.Discussion:https://postgr.es/m/25758.1544983503@sss.pgh.pa.us1 parent16fda4b commita73d083
File tree
12 files changed
+97
-54
lines changed- src
- backend/postmaster
- bin/pg_basebackup
- common
- include
- port
- test/regress
12 files changed
+97
-54
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15230 | 15230 |
| |
15231 | 15231 |
| |
15232 | 15232 |
| |
15233 |
| - | |
| 15233 | + | |
15234 | 15234 |
| |
15235 | 15235 |
| |
15236 | 15236 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1621 | 1621 |
| |
1622 | 1622 |
| |
1623 | 1623 |
| |
| 1624 | + | |
1624 | 1625 |
| |
1625 | 1626 |
| |
1626 | 1627 |
| |
|
Lines changed: 2 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
650 | 650 |
| |
651 | 651 |
| |
652 | 652 |
| |
653 |
| - | |
654 |
| - | |
655 |
| - | |
656 |
| - | |
657 |
| - | |
658 |
| - | |
659 |
| - | |
660 | 653 |
| |
661 | 654 |
| |
662 |
| - | |
663 |
| - | |
| 655 | + | |
| 656 | + | |
664 | 657 |
| |
665 | 658 |
| |
666 | 659 |
| |
|
Lines changed: 4 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3612 | 3612 |
| |
3613 | 3613 |
| |
3614 | 3614 |
| |
| 3615 | + | |
3615 | 3616 |
| |
3616 | 3617 |
| |
3617 | 3618 |
| |
| |||
3622 | 3623 |
| |
3623 | 3624 |
| |
3624 | 3625 |
| |
3625 |
| - | |
| 3626 | + | |
3626 | 3627 |
| |
3627 | 3628 |
| |
3628 | 3629 |
| |
3629 | 3630 |
| |
3630 | 3631 |
| |
3631 | 3632 |
| |
3632 | 3633 |
| |
3633 |
| - | |
3634 |
| - | |
3635 |
| - | |
3636 |
| - | |
3637 |
| - | |
3638 |
| - | |
3639 |
| - | |
3640 |
| - | |
3641 |
| - | |
3642 |
| - | |
3643 |
| - | |
| 3634 | + | |
3644 | 3635 |
| |
3645 | 3636 |
| |
| 3637 | + | |
3646 | 3638 |
| |
3647 | 3639 |
| |
3648 | 3640 |
| |
|
Lines changed: 6 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2066 | 2066 |
| |
2067 | 2067 |
| |
2068 | 2068 |
| |
2069 |
| - | |
| 2069 | + | |
2070 | 2070 |
| |
2071 | 2071 |
| |
2072 | 2072 |
| |
| |||
2094 | 2094 |
| |
2095 | 2095 |
| |
2096 | 2096 |
| |
2097 |
| - | |
| 2097 | + | |
2098 | 2098 |
| |
2099 | 2099 |
| |
2100 | 2100 |
| |
| |||
2103 | 2103 |
| |
2104 | 2104 |
| |
2105 | 2105 |
| |
2106 |
| - | |
| 2106 | + | |
2107 | 2107 |
| |
2108 | 2108 |
| |
2109 |
| - | |
2110 |
| - | |
2111 |
| - | |
2112 |
| - | |
2113 |
| - | |
2114 |
| - | |
2115 |
| - | |
| 2109 | + | |
2116 | 2110 |
| |
2117 |
| - | |
2118 |
| - | |
| 2111 | + | |
| 2112 | + | |
2119 | 2113 |
| |
2120 | 2114 |
| |
2121 | 2115 |
| |
|
Lines changed: 4 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
| 59 | + | |
59 | 60 |
| |
60 | 61 |
| |
61 | 62 |
| |
62 | 63 |
| |
63 |
| - | |
64 |
| - | |
65 |
| - | |
66 |
| - | |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 |
| - | |
72 |
| - | |
73 | 64 |
| |
74 | 65 |
| |
75 |
| - | |
76 |
| - | |
| 66 | + | |
| 67 | + | |
77 | 68 |
| |
| 69 | + | |
78 | 70 |
| |
79 | 71 |
| |
80 | 72 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
559 | 559 |
| |
560 | 560 |
| |
561 | 561 |
| |
| 562 | + | |
| 563 | + | |
| 564 | + | |
562 | 565 |
| |
563 | 566 |
| |
564 | 567 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
415 | 415 |
| |
416 | 416 |
| |
417 | 417 |
| |
| 418 | + | |
| 419 | + | |
| 420 | + | |
418 | 421 |
| |
419 | 422 |
| |
420 | 423 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
209 | 209 |
| |
210 | 210 |
| |
211 | 211 |
| |
| 212 | + | |
| 213 | + | |
| 214 | + | |
212 | 215 |
| |
213 | 216 |
| |
214 | 217 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
| 40 | + | |
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
|
Lines changed: 67 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + |
Lines changed: 2 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1560 | 1560 |
| |
1561 | 1561 |
| |
1562 | 1562 |
| |
1563 |
| - | |
1564 |
| - | |
1565 |
| - | |
1566 |
| - | |
1567 |
| - | |
1568 | 1563 |
| |
1569 |
| - | |
1570 |
| - | |
| 1564 | + | |
| 1565 | + | |
1571 | 1566 |
| |
1572 | 1567 |
| |
1573 | 1568 |
| |
|
0 commit comments
Comments
(0)