diff options
author | Christoph Lohmann <20h@r-36.net> | 2016-01-28 18:09:11 +0100 |
---|---|---|
committer | Christoph Lohmann <20h@r-36.net> | 2016-01-28 18:09:11 +0100 |
commit | 504a165277c13797840c42c64807b59cd4e5f3a5 (patch) | |
tree | 9ea79130f5e9161ba44a5f72c401f98baaef4727 | |
parent | 9031e228ce283cd4847832acf012a910f74ad1ed (diff) | |
download | st-patched-504a165277c13797840c42c64807b59cd4e5f3a5.tar.bz2 st-patched-504a165277c13797840c42c64807b59cd4e5f3a5.tar.xz st-patched-504a165277c13797840c42c64807b59cd4e5f3a5.zip |
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.
-rw-r--r-- | st.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1440,6 +1440,8 @@ ttynew(void) | |||
1440 | if (openpty(&m, &s, NULL, NULL, &w) < 0) | 1440 | if (openpty(&m, &s, NULL, NULL, &w) < 0) |
1441 | die("openpty failed: %s\n", strerror(errno)); | 1441 | die("openpty failed: %s\n", strerror(errno)); |
1442 | 1442 | ||
1443 | ttyresize(); | ||
1444 | |||
1443 | switch (pid = fork()) { | 1445 | switch (pid = fork()) { |
1444 | case -1: | 1446 | case -1: |
1445 | die("fork failed\n"); | 1447 | die("fork failed\n"); |