mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-24 06:04:08 +00:00
Forgot to modify the fds array in remove children
This commit is contained in:
parent
c97afd7b44
commit
6379b3f898
1 changed files with 2 additions and 0 deletions
|
|
@ -532,9 +532,11 @@ remove_children(ChildMonitor *self) {
|
|||
remove_queue[remove_queue_count] = children[i];
|
||||
remove_queue_count++;
|
||||
children[i] = EMPTY_CHILD;
|
||||
fds[EXTRA_FDS + i].fd = -1;
|
||||
size_t num_to_right = self->count - 1 - i;
|
||||
if (num_to_right > 0) {
|
||||
memmove(children + i, children + i + 1, num_to_right * sizeof(Child));
|
||||
memmove(fds + EXTRA_FDS + i, fds + EXTRA_FDS + i + 1, num_to_right * sizeof(struct pollfd));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue