Skip to content

Make hyprctl listener non-blocking and bounded#12587

Open
Rtur2003 wants to merge 1 commit intohyprwm:mainfrom
Rtur2003:mr/ipc-76
Open

Make hyprctl listener non-blocking and bounded#12587
Rtur2003 wants to merge 1 commit intohyprwm:mainfrom
Rtur2003:mr/ipc-76

Conversation

@Rtur2003
Copy link
Copy Markdown
Contributor

@Rtur2003 Rtur2003 commented Dec 7, 2025

Summary

  • set listener/accepted sockets to SOCK_NONBLOCK and remove the blocking poll
  • bound request size to 64KiB and tighten read/accept error handling

Testing

  • manual: run hyprctl commands; verify no hangs and large input is rejected safely

…ed fds use SOCK_NONBLOCK, removed the blocking poll, added a 64KiB request cap, and clearer read/accept error handling
Comment thread src/debug/HyprCtl.cpp
if (messageSize == 0)
break;
request.append(readBuffer.data(), rc<size_t>(messageSize));
if (messageSize < static_cast<int>(readBuffer.size()))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sc<>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants