aboutsummaryrefslogtreecommitdiff
path: root/status.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--status.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/status.c b/status.c
index 92fc7bc..4bbea28 100644
--- a/status.c
+++ b/status.c
@@ -168,7 +168,9 @@ status_flush (struct status_output *so)
#if defined(HAVE_FTRUNCATE)
{
const off_t off = lseek (so->fd, (off_t)0, SEEK_CUR);
- ftruncate (so->fd, off);
+ if (ftruncate (so->fd, off) != 0) {
+ msg (M_WARN, "Failed to truncate status file: %s", strerror(errno));
+ }
}
#elif defined(HAVE_CHSIZE)
{