]> rtime.felk.cvut.cz Git - frescor/forb.git/blob - src/forbrun/tests/forbrun_printargs.c
forb: Add tests for forbrun command line parameters
[frescor/forb.git] / src / forbrun / tests / forbrun_printargs.c
1 #include <forb.h>
2 #include <stdio.h>
3
4 int forb_main(forb_orb orb, int argc, char *argv[])
5 {
6         int i;
7         for (i=0; i<argc; i++)
8                 printf("%s%s", argv[i], i+1 < argc ? " " : "");
9         printf("\n");
10         if (argc < 2 || strcmp(argv[1], "--exit") != 0) {
11                 /* Allow starting the next shared library */
12                 forb_signal_server_ready(orb);
13                 /* Exit only this thread, not the whole forbrun */
14                 pthread_exit(0);
15         }
16         return 0;
17 }