projects
/
apps
/
madtty.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Code cleansing
[apps/madtty.git]
/
demo
/
boxshell.c
diff --git
a/demo/boxshell.c
b/demo/boxshell.c
index
76af914
..
505f6b9
100644
(file)
--- a/
demo/boxshell.c
+++ b/
demo/boxshell.c
@@
-56,7
+56,7
@@
static int is_expired(struct timeval now, struct timeval expiry)
int main(void)
{
madtty_t *rt;
int main(void)
{
madtty_t *rt;
- int dirty = 0;
+ int dirty = 0
, pty
;
struct timeval next;
signal(SIGCHLD, handler);
struct timeval next;
signal(SIGCHLD, handler);
@@
-72,7
+72,7
@@
int main(void)
const char *path = getenv("SHELL") ?: "/bin/sh";
const char *args[] = { path, "--login", NULL};
const char *path = getenv("SHELL") ?: "/bin/sh";
const char *args[] = { path, "--login", NULL};
- madtty_forkpty(rt, path, args);
+ madtty_forkpty(rt, path, args
, &pty
);
}
/* keep reading keypresses from the user and passing them to the terminal;
}
/* keep reading keypresses from the user and passing them to the terminal;
@@
-85,10
+85,10
@@
int main(void)
FD_ZERO(&rfds);
FD_SET(0, &rfds);
FD_ZERO(&rfds);
FD_SET(0, &rfds);
- FD_SET(
rt->
pty, &rfds);
+ FD_SET(pty, &rfds);
- if (select(
rt->
pty + 1, &rfds, NULL, NULL, &tv) > 0) {
- if (FD_ISSET(
rt->
pty, &rfds)) {
+ if (select(pty + 1, &rfds, NULL, NULL, &tv) > 0) {
+ if (FD_ISSET(pty, &rfds)) {
madtty_process(rt);
dirty = 1;
}
madtty_process(rt);
dirty = 1;
}