mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-22 12:25:38 +02:00
bar: xcb: check return values of ftruncate(), read() and write()
Fixes building with -D_FORTIFY_SOURCE=2
This commit is contained in:
parent
b41255dbcc
commit
2450cbe7a6
1 changed files with 5 additions and 1 deletions
|
@ -311,7 +311,11 @@ loop(struct bar *_bar,
|
||||||
|
|
||||||
if (fds[1].revents & POLLHUP) {
|
if (fds[1].revents & POLLHUP) {
|
||||||
LOG_WARN("disconnected from XCB");
|
LOG_WARN("disconnected from XCB");
|
||||||
write(_bar->abort_fd, &(uint64_t){1}, sizeof(uint64_t));
|
if (write(_bar->abort_fd, &(uint64_t){1}, sizeof(uint64_t))
|
||||||
|
!= sizeof(uint64_t))
|
||||||
|
{
|
||||||
|
LOG_ERRNO("failed to signal abort to modules");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue