diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-08-11 14:30:27 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-08-11 14:30:27 +0000 |
commit | c1403ef1539f60b323f57a0e344734111b4c18cf (patch) | |
tree | 359febe4b621feb410b36e0567606827a0d2a503 /c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc | |
parent | Initialization of semaphores was incorrect. It did not force (diff) | |
download | rtems-c1403ef1539f60b323f57a0e344734111b4c18cf.tar.bz2 |
Added flush of output on exit. On some UNIX's using the native library
resulted in no output when the output was redirected until this was done.
Redirection is important because runtest redirects test output.
Added support for numerous environment variables which make it easier
to run a multi-node system using a single executable and to tailor
the size of the workspace and heap.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc b/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc index 4c55f3798f..3831f9456f 100644 --- a/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc +++ b/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc @@ -1,12 +1,12 @@ // @(#)rtems-ctor.cc 1.6 - 95/04/25 -// +// // /* * rtems-ctor.cc * * Description: - * This file exists solely to (try to) ensure RTEMS is initialized + * This file exists solely to (try to) ensure RTEMS is initialized * before any global constructors are run. * * The problem: @@ -49,6 +49,8 @@ */ #include <bsp.h> +#include <stdio.h> +#include <stdlib.h> /* * RTEMS program name @@ -61,7 +63,7 @@ char *rtems_progname; class RTEMS { public: - RTEMS(); + RTEMS(); ~RTEMS(); }; @@ -83,9 +85,9 @@ extern "C" { char **argv, char **environp) { - rtems_argc = argc; - rtems_argv = argv; - rtems_envp = environp; + rtems_argc = argc; + rtems_argv = argv; + rtems_envp = environp; if ((argc > 0) && argv && argv[0]) rtems_progname = argv[0]; @@ -103,6 +105,8 @@ extern "C" { * This allows our destructors to get run normally */ + fflush( stdout ); + fflush( stderr ); return 0; } } |