mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-01 15:18:06 +00:00
WindowServer: Fix leaking framebuffer fd to clients
Now that the WindowServer's menu is the primary way to start apps, it is especially noticable that it leaks the /dev/fb0 fd to the apps that it spawns. Fix that by opening it with O_CLOEXEC.
This commit is contained in:
parent
cfdbb712fb
commit
bf012ca10a
Notes:
sideshowbarker
2024-07-19 11:14:34 +09:00
Author: https://github.com/bugaevc
Commit: bf012ca10a
Pull-request: https://github.com/SerenityOS/serenity/pull/774
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ WSScreen::WSScreen(unsigned desired_width, unsigned desired_height)
|
|||
{
|
||||
ASSERT(!s_the);
|
||||
s_the = this;
|
||||
m_framebuffer_fd = open("/dev/fb0", O_RDWR);
|
||||
m_framebuffer_fd = open("/dev/fb0", O_RDWR | O_CLOEXEC);
|
||||
ASSERT(m_framebuffer_fd >= 0);
|
||||
|
||||
if (fb_set_buffer(m_framebuffer_fd, 0) == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue