mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-20 03:35:41 +02:00
main: check return value of write()
Fixes build with -D_FORTIFY_SOURCE=2
This commit is contained in:
parent
2654d37548
commit
8cc6e67c16
1 changed files with 2 additions and 1 deletions
3
main.c
3
main.c
|
@ -179,7 +179,8 @@ main(int argc, const char *const *argv)
|
||||||
LOG_INFO("aborted: %s (%d)", strsignal(aborted), aborted);
|
LOG_INFO("aborted: %s (%d)", strsignal(aborted), aborted);
|
||||||
|
|
||||||
/* Signal abort to other threads */
|
/* Signal abort to other threads */
|
||||||
write(abort_fd, &(uint64_t){1}, sizeof(uint64_t));
|
if (write(abort_fd, &(uint64_t){1}, sizeof(uint64_t)) != sizeof(uint64_t))
|
||||||
|
LOG_ERRNO("failed to signal abort to threads");
|
||||||
|
|
||||||
int res;
|
int res;
|
||||||
int r = thrd_join(bar_thread, &res);
|
int r = thrd_join(bar_thread, &res);
|
||||||
|
|
Loading…
Add table
Reference in a new issue