mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:02:45 +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
					
				
					 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
	
	 Sergey Bugaev
						Sergey Bugaev