SunOS can rot in hell.
This commit is contained in:
parent
4e3a2cc1f9
commit
be22ae2d07
52 changed files with 211 additions and 160 deletions
|
|
@ -1,6 +1,8 @@
|
|||
#include "9term.h"
|
||||
#include <u.h>
|
||||
#include <termios.h>
|
||||
#include <sys/termios.h>
|
||||
#include <libc.h>
|
||||
#include "term.h"
|
||||
|
||||
int
|
||||
getpts(int fd[], char *slave)
|
||||
|
|
@ -14,6 +16,19 @@ getpts(int fd[], char *slave)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
childpty(int fd[], char *slave)
|
||||
{
|
||||
int sfd;
|
||||
|
||||
close(fd[1]);
|
||||
setsid();
|
||||
sfd = open(slave, ORDWR);
|
||||
if(sfd < 0)
|
||||
sysfatal("open %s: %r\n", slave);
|
||||
return sfd;
|
||||
}
|
||||
|
||||
struct winsize ows;
|
||||
|
||||
void
|
||||
|
|
@ -26,7 +41,7 @@ updatewinsize(int row, int col, int dx, int dy)
|
|||
ws.ws_xpixel = dx;
|
||||
ws.ws_ypixel = dy;
|
||||
if(ws.ws_row != ows.ws_row || ws.ws_col != ows.ws_col)
|
||||
if(ioctl(rcfd[0], TIOCSWINSZ, &ws) < 0)
|
||||
if(ioctl(rcfd, TIOCSWINSZ, &ws) < 0)
|
||||
fprint(2, "ioctl: %r\n");
|
||||
ows = ws;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue