mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 09:18:08 +02:00
Fix reading multiple signals from buffer on macOS
This commit is contained in:
@@ -171,8 +171,8 @@ read_signals(int fd, handle_signal_func callback, void *data) {
|
|||||||
bool keep_going = true;
|
bool keep_going = true;
|
||||||
while (keep_going && buf_pos >= sizeof(siginfo_t)) {
|
while (keep_going && buf_pos >= sizeof(siginfo_t)) {
|
||||||
keep_going = callback((siginfo_t*)buf, data);
|
keep_going = callback((siginfo_t*)buf, data);
|
||||||
memmove(buf, buf + sizeof(siginfo_t), sizeof(siginfo_t));
|
|
||||||
buf_pos -= sizeof(siginfo_t);
|
buf_pos -= sizeof(siginfo_t);
|
||||||
|
memmove(buf, buf + sizeof(siginfo_t), buf_pos);
|
||||||
}
|
}
|
||||||
if (len == 0) break;
|
if (len == 0) break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user