while (1) {
int ret;
- printf("vsys>");
+ printf("vsys>");fflush(stdout);
+ FD_SET(0, &set);
+ FD_SET(vfd0, &set);
ret = select(vfd0+1, &set, NULL, NULL, &tv);
if (FD_ISSET(0,&set)) {
char lineread[2048];
ret=read(0,lineread,2048);
write(vfd1,lineread,ret);
FD_CLR(0,&set);
- }
- else if (FD_ISSET(vfd0,&set)) {
+ } if (FD_ISSET(vfd0,&set)) {
char lineread[2048];
int ret;
ret=read(vfd0,lineread,2048);