#include <stdio.h>
#include <aitio.h>
#include <sys/wait.h>
int
main(int argc, char **argv)
{
prog_t *p;
int ret = 0;
if (argc < 2)
return 1;
p = io_progInit(argv[1], 3, 10);
if (!p) {
ELIBERR(io);
return 2;
} else if ((ret = io_progCheck(p))) {
printf("0.exited procs=%d\n", ret);
goto end;
} else {
printf("wait for keystroke %p ", p);
getchar();
}
ret = io_progCheck(p);
if (ret) {
printf("1.exited procs=%d\n", ret);
goto end;
}
end:
io_progDestroy(&p);
return ret;
}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>