fix compile warning about write() return code

This commit is contained in:
Daniel Poelzleithner 2022-06-03 05:06:33 +02:00
parent c5514e0451
commit c84e3d0e05

View File

@ -755,9 +755,16 @@ write_pidfile
snprintf( buf, sizeof( buf ), "%i\n", getpid( ) );
write( pidfile_fd, buf, strlen( buf ) );
if (write( pidfile_fd, buf, strlen( buf ) ) != strlen(buf)) {
printlogf(
L, "Error",
"Cannot write pidfile; '%s'",
pidfile
);
safeexit(L, -1 );
}
//fclose( f );
}