Enforce a terminal size to reduce race conditions in too efficient apps.
dvtm is too fast in starting up. It will then have a race condition in finding the right. terminal size.
This commit is contained in:
		
							
								
								
									
										2
									
								
								st.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								st.c
									
									
									
									
									
								
							| @@ -1440,6 +1440,8 @@ ttynew(void) | |||||||
| 	if (openpty(&m, &s, NULL, NULL, &w) < 0) | 	if (openpty(&m, &s, NULL, NULL, &w) < 0) | ||||||
| 		die("openpty failed: %s\n", strerror(errno)); | 		die("openpty failed: %s\n", strerror(errno)); | ||||||
|  |  | ||||||
|  | 	ttyresize(); | ||||||
|  |  | ||||||
| 	switch (pid = fork()) { | 	switch (pid = fork()) { | ||||||
| 	case -1: | 	case -1: | ||||||
| 		die("fork failed\n"); | 		die("fork failed\n"); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user