Merge pull request #3783 from eriksjolund/fix_read_count

Adjust read count so that a newline can be added afterwards
This commit is contained in:
OpenShift Merge Robot 2019-08-11 19:22:59 +02:00 committed by GitHub
commit 7bbaa36a13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -276,7 +276,7 @@ static void __attribute__((constructor)) init()
return;
}
r = TEMP_FAILURE_RETRY (read (fd, buf, sizeof (buf)));
r = TEMP_FAILURE_RETRY (read (fd, buf, sizeof (buf) - 1));
close (fd);
if (r < 0)
{