1
0
Fork 0
mirror of https://github.com/pygos/init.git synced 2024-05-17 03:06:13 +02:00

usyslogd: report error if file operation fails

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-08-19 10:14:19 +02:00
parent 5509e77a1c
commit f51dca0878

View file

@ -108,6 +108,7 @@ static int logfile_open(logfile_t *file)
file->size = sb.st_size;
return 0;
fail:
perror(file->filename);
close(file->fd);
file->fd = -1;
return -1;