[rtems-testing commit] gcc/rtems_gcc_main.c: exit() if main returns
Sebastian Huber
sebh at rtems.org
Mon Feb 24 12:38:02 UTC 2014
Module: rtems-testing
Branch: master
Commit: 13b0ee9fbf9b6fc340abcab54c12938eb903f9a0
Changeset: http://git.rtems.org/rtems-testing/commit/?id=13b0ee9fbf9b6fc340abcab54c12938eb903f9a0
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Feb 21 09:14:50 2014 +0100
gcc/rtems_gcc_main.c: exit() if main returns
---
gcc/rtems_gcc_main.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/gcc/rtems_gcc_main.c b/gcc/rtems_gcc_main.c
index b5b3d38..3bd1dc0 100644
--- a/gcc/rtems_gcc_main.c
+++ b/gcc/rtems_gcc_main.c
@@ -13,6 +13,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <pthread.h>
+#include <stdlib.h>
/*
* Set up first argument
@@ -39,9 +40,12 @@ static void signal_workaround(void)
rtems_task Init(rtems_task_argument ignored)
{
+ int status;
+
signal_workaround();
mkdir( "/tmp", 0777 );
- main(argc, argv, NULL);
+ status = main(argc, argv, NULL);
+ exit(status);
}
/* configuration information */
More information about the vc
mailing list