mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	backend/session: open TTY with O_CLOEXEC for direct session
This commit is contained in:
		
							parent
							
								
									30d3426164
								
							
						
					
					
						commit
						d02548d87a
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -155,7 +155,7 @@ static int vt_handler(int signo, void *data) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static bool setup_tty(struct direct_session *session, struct wl_display *display) {
 | 
					static bool setup_tty(struct direct_session *session, struct wl_display *display) {
 | 
				
			||||||
	int fd = open("/dev/tty", O_RDWR);
 | 
						int fd = open("/dev/tty", O_RDWR | O_CLOEXEC);
 | 
				
			||||||
	if (fd == -1) {
 | 
						if (fd == -1) {
 | 
				
			||||||
		wlr_log_errno(WLR_ERROR, "Cannot open /dev/tty");
 | 
							wlr_log_errno(WLR_ERROR, "Cannot open /dev/tty");
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue