--- libaitio/example/test_exec.c 2013/12/06 01:05:04 1.1.2.8 +++ libaitio/example/test_exec.c 2013/12/08 21:11:54 1.1.2.12 @@ -21,7 +21,7 @@ main(int argc, char **argv) if (!p) { ELIBERR(io); return 2; - } else if ((ret = io_progCheck(p))) { + } else if ((ret = io_progCheck(p, 0))) { printf("0.exited procs=%d\n", ret); goto end; } else { @@ -29,7 +29,7 @@ main(int argc, char **argv) getchar(); } - ret = io_progCheck(p); + ret = io_progCheck(p, 0); if (ret) { printf("1.exited procs=%d\n", ret); goto end; @@ -52,8 +52,11 @@ main(int argc, char **argv) again: f = io_progAttach(p); printf("f=%d\n", f); + write(f, "v\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: