Changeset f64c6b4 in rtems


Ignore:
Timestamp:
Jan 25, 2016, 8:23:53 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
ca4602e
Parents:
3d36164f
git-author:
Sebastian Huber <sebastian.huber@…> (01/25/16 20:23:53)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/03/16 09:00:57)
Message:

Use atexit() handler to close std file descriptors

Location:
cpukit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/include/rtems/libio.h

    r3d36164f rf64c6b4  
    14881488extern const rtems_libio_helper rtems_libio_post_driver_helper;
    14891489
    1490 extern const rtems_libio_helper rtems_libio_exit_helper;
    1491 
    14921490void rtems_libio_helper_null(void);
    14931491
  • cpukit/libcsupport/src/newlibc_exit.c

    r3d36164f rf64c6b4  
    1515
    1616#if defined(RTEMS_NEWLIB)
    17 #include <rtems/libio.h>
    18 
    1917#include <stdio.h>
    2018#include <unistd.h>
     
    4240  #endif
    4341
    44   (*rtems_libio_exit_helper)();
    4542  rtems_shutdown_executive(status);
    4643  /* does not return */
  • cpukit/libcsupport/src/open_dev_console.c

    r3d36164f rf64c6b4  
    1717#include <rtems/libio.h>
    1818#include <fcntl.h>
     19#include <stdlib.h>
    1920
    2021/*
     
    4647  if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
    4748    rtems_fatal_error_occurred( 0x55544432 );  /* error STD2 */
     49
     50  atexit(rtems_libio_exit);
    4851}
    4952
  • cpukit/sapi/include/confdefs.h

    r3d36164f rf64c6b4  
    128128  #else
    129129    rtems_libio_post_driver;
    130   #endif
    131 
    132 const rtems_libio_helper rtems_libio_exit_helper =
    133   #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
    134     rtems_libio_helper_null;
    135   #else
    136     rtems_libio_exit;
    137130  #endif
    138131
Note: See TracChangeset for help on using the changeset viewer.