forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit183926d
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 parentffb4cee commit183926d
1 file changed
+12
-7
lines changedLines changed: 12 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| 19 | + | |
19 | 20 |
| |
20 | 21 |
| |
21 | 22 |
| |
| |||
738 | 739 |
| |
739 | 740 |
| |
740 | 741 |
| |
741 |
| - | |
742 |
| - | |
743 |
| - | |
744 | 742 |
| |
745 | 743 |
| |
746 | 744 |
| |
| |||
767 | 765 |
| |
768 | 766 |
| |
769 | 767 |
| |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
770 | 773 |
| |
771 | 774 |
| |
772 | 775 |
| |
773 | 776 |
| |
774 | 777 |
| |
775 | 778 |
| |
776 |
| - | |
777 |
| - | |
778 |
| - | |
779 |
| - | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
780 | 785 |
| |
781 | 786 |
| |
782 | 787 |
| |
|
0 commit comments
Comments
(0)