forked from external/yambar
Open sockets, files etc with FD_CLOEXEC
This commit is contained in:
parent
650d1f13f9
commit
a367895dc6
12 changed files with 32 additions and 32 deletions
|
@ -664,7 +664,7 @@ handle_window_event(int sock, int type, const struct json_object *json, void *_m
|
|||
char path[64];
|
||||
snprintf(path, sizeof(path), "/proc/%u/comm", ws->window.pid);
|
||||
|
||||
int fd = open(path, O_RDONLY);
|
||||
int fd = open(path, O_RDONLY | O_CLOEXEC);
|
||||
if (fd == -1) {
|
||||
/* Application may simply have terminated */
|
||||
free(ws->window.application);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue