From 936fcc4668125ab4dd198b14288b318308d9f7de Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 24 Nov 2023 16:41:47 +0100 Subject: [PATCH] show-status: suffix output ith CRNL rather than just NL This is similar to #30183 but focusses on the status output rather than the log output. Since the status output always goes to a TTY we don't have to conditionalize things on isatty(). Fixes: #30184 --- src/core/show-status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/show-status.c b/src/core/show-status.c index 1d47c0af4d2..606237ee0ea 100644 --- a/src/core/show-status.c +++ b/src/core/show-status.c @@ -94,7 +94,7 @@ int status_vprintf(const char *status, ShowStatusFlags flags, const char *format } iovec[n++] = IOVEC_MAKE_STRING(s); - iovec[n++] = IOVEC_MAKE_STRING("\n"); + iovec[n++] = IOVEC_MAKE_STRING("\r\n"); /* use CRNL instead of just NL, to be robust towards TTYs in raw mode */ if (prev_ephemeral && !FLAGS_SET(flags, SHOW_STATUS_EPHEMERAL)) iovec[n++] = IOVEC_MAKE_STRING(ANSI_ERASE_TO_END_OF_LINE); -- 2.39.5