mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-11-16 10:05:12 +00:00
fix compile warning about write() return code
This commit is contained in:
parent
c5514e0451
commit
c84e3d0e05
11
lsyncd.c
11
lsyncd.c
@ -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 );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user