add custom pty interface
This commit is contained in:
parent
bd87f194f2
commit
c68fc6de5e
3 changed files with 170 additions and 0 deletions
24
cli/main.c
Normal file
24
cli/main.c
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#include "mkpty.h"
|
||||
#include "sys/types.h"
|
||||
|
||||
|
||||
// struct d_window {
|
||||
// int ptmx; // fd
|
||||
// };
|
||||
|
||||
// struct d_window new_window() {
|
||||
// struct d_window w = {
|
||||
// .ptmx = posix_openpt(O_RDWR | O_NOCTTY),
|
||||
// };
|
||||
// }
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
pid_t pid;
|
||||
switch (pid = forkmkpty()) {
|
||||
case -1:
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue