mirror of
https://github.com/swaywm/sway.git
synced 2026-04-27 06:46:25 -04:00
config: Fix socket/wl_client leaks when executing child processes
Added spawn_wl_client helper function that is used for spawning both bar and background processes
This commit is contained in:
parent
9670ccee68
commit
9fca1c785a
6 changed files with 185 additions and 213 deletions
14
include/sway/util.h
Normal file
14
include/sway/util.h
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#ifndef _SWAY_SWAY_UTIL_H
|
||||
#define _SWAY_SWAY_UTIL_H
|
||||
|
||||
#include <spawn.h>
|
||||
|
||||
/**
|
||||
* Close fd and log theoretical case when close(2) failed
|
||||
*/
|
||||
void close_warn(int fd);
|
||||
|
||||
struct wl_client *spawn_wl_client(char * const cmd[], struct wl_display *display);
|
||||
struct wl_client *spawn_wl_client_fa(char * const cmd[], struct wl_display *display, posix_spawn_file_actions_t *fa);
|
||||
|
||||
#endif//_SWAY_SWAY_UTIL_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue