forked from Imagelibrary/rtems
Add and use rtems_libio_exit_helper. Add rtems_libio_exit(). The fclose(stdin) etc. makes no sense during exit. This would use the _REENT structure of the thread calling _exit().
35 lines
566 B
C
35 lines
566 B
C
/**
|
|
* @file
|
|
*
|
|
* @ingroup LibIO
|
|
*/
|
|
|
|
/*
|
|
* Copyright (c) 2013 embedded brains GmbH. All rights reserved.
|
|
*
|
|
* embedded brains GmbH
|
|
* Obere Lagerstr. 30
|
|
* 82178 Puchheim
|
|
* Germany
|
|
* <rtems@embedded-brains.de>
|
|
*
|
|
* The license and distribution terms for this file may be
|
|
* found in the file LICENSE in this distribution or at
|
|
* http://www.rtems.com/license/LICENSE.
|
|
*/
|
|
|
|
#if HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <rtems/libio.h>
|
|
|
|
void rtems_libio_exit(void)
|
|
{
|
|
(void)close(0);
|
|
(void)close(1);
|
|
(void)close(2);
|
|
}
|