mirror of
https://github.com/swaywm/sway.git
synced 2026-04-30 06:46:24 -04:00
Handle sigchld instead of blocking on waitpid
This stops any potential blocking when killing swaybg (e.g. reloading config). We also forcefully close their wayland connection, in case they're slow to die and we start a new swaybg.
This commit is contained in:
parent
2ccf511cba
commit
a13c8efdcd
4 changed files with 32 additions and 11 deletions
|
|
@ -535,8 +535,6 @@ void load_swaybar(struct bar_config *bar);
|
|||
|
||||
void load_swaybars(void);
|
||||
|
||||
void terminate_swaybg(pid_t pid);
|
||||
|
||||
struct bar_config *default_bar_config(void);
|
||||
|
||||
void free_bar_config(struct bar_config *bar);
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ struct sway_server {
|
|||
struct wl_event_loop *wl_event_loop;
|
||||
const char *socket;
|
||||
|
||||
struct wl_event_source *sigchld_source;
|
||||
|
||||
struct wlr_backend *backend;
|
||||
|
||||
struct wlr_compositor *compositor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue