--- libaitio/example/test_exec.c 2013/12/06 01:05:04 1.1.2.8 +++ libaitio/example/test_exec.c 2013/12/08 20:43:22 1.1.2.10 @@ -52,8 +52,11 @@ main(int argc, char **argv) again: f = io_progAttach(p); printf("f=%d\n", f); + write(f, "\n", 1); + memset(str, 0, sizeof str); while (read(f, str, sizeof str) > 0) { printf(">>> %s", str); + memset(str, 0, sizeof str); read(0, str, sizeof str); if (*str == '.') break; @@ -61,7 +64,7 @@ again: } io_progDetach(p, f); - printf("wait for keystroke %p ", p); + printf("(r) wait for keystroke %p ", p); if (getchar() == 'a') goto again; end: