mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Do not attempt to use TIOCSWINSZ on a -1 file descriptor (possible if
the pane has already died).
This commit is contained in:
		@@ -1069,7 +1069,7 @@ server_client_resize_force(struct window_pane *wp)
 | 
			
		||||
	memset(&ws, 0, sizeof ws);
 | 
			
		||||
	ws.ws_col = wp->sx;
 | 
			
		||||
	ws.ws_row = wp->sy - 1;
 | 
			
		||||
	if (ioctl(wp->fd, TIOCSWINSZ, &ws) == -1)
 | 
			
		||||
	if (wp->fd != -1 && ioctl(wp->fd, TIOCSWINSZ, &ws) == -1)
 | 
			
		||||
		fatal("ioctl failed");
 | 
			
		||||
	log_debug("%s: %%%u forcing resize", __func__, wp->id);
 | 
			
		||||
 | 
			
		||||
@@ -1095,7 +1095,7 @@ server_client_resize_event(__unused int fd, __unused short events, void *data)
 | 
			
		||||
	memset(&ws, 0, sizeof ws);
 | 
			
		||||
	ws.ws_col = wp->sx;
 | 
			
		||||
	ws.ws_row = wp->sy;
 | 
			
		||||
	if (ioctl(wp->fd, TIOCSWINSZ, &ws) == -1)
 | 
			
		||||
	if (wp->fd != -1 && ioctl(wp->fd, TIOCSWINSZ, &ws) == -1)
 | 
			
		||||
		fatal("ioctl failed");
 | 
			
		||||
	log_debug("%s: %%%u resize to %u,%u", __func__, wp->id, wp->sx, wp->sy);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user