]> rtime.felk.cvut.cz Git - frescor/forb.git/commitdiff
forbrun: Exit whenever the first forb_main() returns
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 17 Feb 2011 14:32:30 +0000 (15:32 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 17 Feb 2011 14:32:30 +0000 (15:32 +0100)
The exit code of forbrun is the returned value of forb_main().

src/forbrun/forbrun.c

index 6f33ade5888da70e202ebd697a6e3c90ace5b79e..1f1d47216505fa3a8c7fc6ca1367d218bb7261e7 100644 (file)
@@ -47,9 +47,7 @@ void *forb_main_thread(void *arg)
        struct forb_main_data *data = arg;
        int ret;
        ret = data->forb_main(data->orb, data->argc, data->argv);
-       if (ret != 0)
-               fprintf(stderr, "forb_main() in %s returned %d\n",
-                       data->filename, ret);
+       exit(ret);
        return NULL;
 }