git://git.onelab.eu
/
vsys.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Creepiest bug ever
[vsys.git]
/
vsyssh
/
vsyssh.c
diff --git
a/vsyssh/vsyssh.c
b/vsyssh/vsyssh.c
index
3d32454
..
586c6a7
100644
(file)
--- a/
vsyssh/vsyssh.c
+++ b/
vsyssh/vsyssh.c
@@
-60,6
+60,8
@@
int main(int argc, char **argv, char **envp)
int ret;
printf("vsys>");fflush(stdout);
ret = select(vfd0+1, &set, NULL, NULL, &tv);
int ret;
printf("vsys>");fflush(stdout);
ret = select(vfd0+1, &set, NULL, NULL, &tv);
+ FD_SET(0, &set);
+ FD_SET(vfd0, &set);
if (FD_ISSET(0,&set)) {
char lineread[2048];
int ret;
if (FD_ISSET(0,&set)) {
char lineread[2048];
int ret;
@@
-68,12
+70,13
@@
int main(int argc, char **argv, char **envp)
write(vfd1,lineread,ret);
FD_CLR(0,&set);
}
write(vfd1,lineread,ret);
FD_CLR(0,&set);
}
-
else
if (FD_ISSET(vfd0,&set)) {
+ if (FD_ISSET(vfd0,&set)) {
char lineread[2048];
int ret;
printf("Here2\n");
ret=read(vfd0,lineread,2048);
write(1,lineread,ret);
char lineread[2048];
int ret;
printf("Here2\n");
ret=read(vfd0,lineread,2048);
write(1,lineread,ret);
+ printf("Here3\n");
FD_CLR(vfd0,&set);
}
}
FD_CLR(vfd0,&set);
}
}