Make the pipe daemon not drop stdin bytes 54/254654/1
authorMateusz Majewski <m.majewski2@samsung.com>
Fri, 5 Mar 2021 15:08:39 +0000 (16:08 +0100)
committerMateusz Majewski <m.majewski2@samsung.com>
Fri, 5 Mar 2021 16:21:31 +0000 (17:21 +0100)
commit58d502bcab20a1ef988124fc63de9958de3b5098
tree97f80e36fd41a01017540e4d8724a4a97b34842d
parented0dba7480cd4bbb085bcebc929c4ff7fdf57a8a
Make the pipe daemon not drop stdin bytes

The daemon part of the stdin redirection wrongly assumed that the log
will always fit to the structure. If it didn't the part that fit was
written, but all bytes were removed from the input buffer, which
resulted in dropping all the extra bytes. This commit fixes that by
dropping the exact right amount of bytes.

Change-Id: I48fc9f80b2b617a442b5c5d654d474449a10af8c
src/logger/log_buffer.c