1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-15 15:43:24 +00:00

READLINE now prints newline on empty input line

This commit is contained in:
Gerhard Rieger 2025-01-24 16:54:50 +01:00
parent 920ed1f0a3
commit 68f0143f7b
2 changed files with 7 additions and 0 deletions

View file

@ -204,6 +204,9 @@ ssize_t xioread_readline(struct single *pipe, void *buff, size_t bufsiz) {
if (line == NULL) {
return 0; /* EOF */
}
if (strlen(line) == 0) {
Write(STDOUT_FILENO, "\n", 1);
}
#if _WITH_TERMIOS
xiotermios_clrflag(pipe->fd, 3, ECHO);
xiotermios_flush(pipe->fd);