mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-24 04:45:41 +02:00
bar: signal abort (to main loop) when backend fails
This commit is contained in:
parent
4ce314e328
commit
5d6df44a79
1 changed files with 2 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <threads.h>
|
#include <threads.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <sys/eventfd.h>
|
#include <sys/eventfd.h>
|
||||||
|
|
||||||
|
@ -238,6 +239,7 @@ run(struct bar *_bar)
|
||||||
|
|
||||||
if (!bar->backend.iface->setup(_bar)) {
|
if (!bar->backend.iface->setup(_bar)) {
|
||||||
bar->backend.iface->cleanup(_bar);
|
bar->backend.iface->cleanup(_bar);
|
||||||
|
write(_bar->abort_fd, &(uint64_t){1}, sizeof(uint64_t));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue