1
0
mirror of https://github.com/aap/pdp6.git synced 2026-01-27 20:48:08 +00:00

committing old stuff

This commit is contained in:
aap
2018-02-07 01:37:09 +01:00
parent a47c3c2bd4
commit 88875b87ce
17 changed files with 920 additions and 18 deletions

View File

@@ -37,6 +37,7 @@ reset(int fd)
#define BAUD 30
struct timespec slp = { 0, 1000*1000*1000 / BAUD };
struct timespec hupslp = { 0, 100*1000*1000 };
//#define SLEEP nanosleep(&slp, NULL)
#define SLEEP
@@ -60,6 +61,8 @@ readwrite(int ttyin, int ttyout, int ptyin, int ptyout)
}
if(n == 0)
return;
if(pfd[0].revents & POLLHUP)
nanosleep(&hupslp, NULL);
/* read from pty, write to tty */
if(pfd[0].revents & POLLIN){
if(n = read(ptyin, &c, 1), n <= 0)