particle: on-mouse: close the read pipe after reading from it, in parent

This commit is contained in:
Daniel Eklöf 2021-06-22 20:18:23 +02:00
parent 13ef977eeb
commit 4e2c4e1e3a
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -295,6 +295,8 @@ exposable_default_on_mouse(struct exposable *exposable, struct bar *bar,
int _errno = 0; int _errno = 0;
ssize_t ret = read(pipe_fds[0], &_errno, sizeof(_errno)); ssize_t ret = read(pipe_fds[0], &_errno, sizeof(_errno));
close(pipe_fds[0]);
if (ret == 0) { if (ret == 0) {
/* Pipe was closed - child succeeded with exec() */ /* Pipe was closed - child succeeded with exec() */
_exit(0); _exit(0);