X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=vsyssh%2Fvsyssh.c;h=fd82c6e9ecba9a93f2e71262e4f0af7911d231c5;hb=97bb62063d093da99f914f8c07cd512e8862a282;hp=586c6a7dadb3c8afe8f8604cee7208d54c5ce8c9;hpb=bf5113ed1eb16ce6e3be794d3e14da0b9d2222de;p=vsys.git diff --git a/vsyssh/vsyssh.c b/vsyssh/vsyssh.c index 586c6a7..fd82c6e 100644 --- a/vsyssh/vsyssh.c +++ b/vsyssh/vsyssh.c @@ -59,24 +59,20 @@ int main(int argc, char **argv, char **envp) while (1) { int ret; printf("vsys>");fflush(stdout); - ret = select(vfd0+1, &set, NULL, NULL, &tv); FD_SET(0, &set); FD_SET(vfd0, &set); + ret = select(vfd0+1, &set, NULL, NULL, &tv); if (FD_ISSET(0,&set)) { char lineread[2048]; int ret; - printf("Here\n"); ret=read(0,lineread,2048); write(vfd1,lineread,ret); FD_CLR(0,&set); - } - 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); - printf("Here3\n"); FD_CLR(vfd0,&set); } }