File:  [ELWIX - Embedded LightWeight unIX -] / libaitio / example / test_exec.c
Revision 1.1.2.2: download - view: text, annotated - select for diffs - revision graph
Thu Dec 5 13:22:10 2013 UTC (10 years, 7 months ago) by misho
Branches: io6_7
fix

    1: #include <stdio.h>
    2: #include <aitio.h>
    3: 
    4: 
    5: int
    6: main(int argc, char **argv)
    7: {
    8: 	prog_t *p;
    9: 
   10: 	if (argc < 2)
   11: 		return 1;
   12: 
   13: 	p = io_progInit(argv[1], 3, 10);
   14: 	if (!p) {
   15: 		ELIBERR(io);
   16: 		return 2;
   17: 	} else {
   18: 		printf("wait for keystroke %p ", p);
   19: 		getchar();
   20: 	}
   21: 
   22: 	io_progDestroy(&p);
   23: 	return 0;
   24: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>