forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit765ad26
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 parentf03a34a commit765ad26
1 file changed
+12
-7
lines changedLines changed: 12 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
20 | 21 |
| |
21 | 22 |
| |
22 | 23 |
| |
| |||
910 | 911 |
| |
911 | 912 |
| |
912 | 913 |
| |
913 |
| - | |
914 |
| - | |
915 |
| - | |
916 | 914 |
| |
917 | 915 |
| |
918 | 916 |
| |
| |||
939 | 937 |
| |
940 | 938 |
| |
941 | 939 |
| |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
942 | 945 |
| |
943 | 946 |
| |
944 | 947 |
| |
945 | 948 |
| |
946 | 949 |
| |
947 | 950 |
| |
948 |
| - | |
949 |
| - | |
950 |
| - | |
951 |
| - | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
952 | 957 |
| |
953 | 958 |
| |
954 | 959 |
| |
|
0 commit comments
Comments
(0)