Explorar o código

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.
Christoph Lohmann %!s(int64=9) %!d(string=hai) anos
pai
achega
504a165277
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      st.c

+ 2 - 0
st.c

@@ -1440,6 +1440,8 @@ ttynew(void)
 	if (openpty(&m, &s, NULL, NULL, &w) < 0)
 		die("openpty failed: %s\n", strerror(errno));
 
+	ttyresize();
+
 	switch (pid = fork()) {
 	case -1:
 		die("fork failed\n");