summaryrefslogtreecommitdiff
path: root/src/daemontools-extras/ucspilogd.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-08-09 17:20:13 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-08-09 17:20:13 +0000
commit4658c489ac59332742b577cb38a6573ef5ab01dd (patch)
treee4e68dc8316188e98a4e5e1c4da10d5745b1d650 /src/daemontools-extras/ucspilogd.c
parentbbcebaa7ac43f0ce281f8b9901e8070819d8f4be (diff)
downloads6-4658c489ac59332742b577cb38a6573ef5ab01dd.tar.xz
ucspilogd: allow last log line to not be null-terminated
Diffstat (limited to 'src/daemontools-extras/ucspilogd.c')
-rw-r--r--src/daemontools-extras/ucspilogd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/daemontools-extras/ucspilogd.c b/src/daemontools-extras/ucspilogd.c
index cf1ae37..3e6cf9b 100644
--- a/src/daemontools-extras/ucspilogd.c
+++ b/src/daemontools-extras/ucspilogd.c
@@ -160,7 +160,11 @@ int main (int argc, char const *const *argv, char const *const *envp)
satmp.len = 0 ;
{
register int r = skagetlnsep(buffer_0f1, &satmp, "\n", 2) ;
- if (r < 0) strerr_diefu1sys(111, "read from stdin") ;
+ if (r < 0)
+ {
+ if (errno != EPIPE || !stralloc_0(&satmp))
+ strerr_diefu1sys(111, "read from stdin") ;
+ }
if (!r) break ;
}
if (!satmp.len) continue ;