forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit90b418f
committed
Fix pg_current_logfile() to not emit a carriage return on Windows.
Due to not having our signals straight about CRLF vs. LF linetermination, the output of pg_current_logfile() included a trailing\r on Windows. To fix, force the file descriptor it uses into textmode.While here, move a couple of local variable declarations to makethe function's logic clearer.In v12 and v13, also back-patch the test added by1c4e88e so thatthis function has some test coverage. However, the 004_logrotate.pltest script doesn't exist before v12, and it didn't seem worth addingto older branches just for this.Per report from Thomas Kellerer. Back-patch to v10 where thisfunction was added.Discussion:https://postgr.es/m/412ae8da-76bb-640f-039a-f3513499e53d@gmx.net1 parent0895257 commit90b418f
1 file changed
+12
-7
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
20 | 21 |
| |
21 | 22 |
| |
22 | 23 |
| |
| |||
930 | 931 |
| |
931 | 932 |
| |
932 | 933 |
| |
933 |
| - | |
934 |
| - | |
935 |
| - | |
936 | 934 |
| |
937 | 935 |
| |
938 | 936 |
| |
| |||
959 | 957 |
| |
960 | 958 |
| |
961 | 959 |
| |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
962 | 965 |
| |
963 | 966 |
| |
964 | 967 |
| |
965 | 968 |
| |
966 | 969 |
| |
967 | 970 |
| |
968 |
| - | |
969 |
| - | |
970 |
| - | |
971 |
| - | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
972 | 977 |
| |
973 | 978 |
| |
974 | 979 |
| |
|
0 commit comments
Comments
(0)