Esempio n. 1
0
File: _exit.c Progetto: mariuz/haiku
void
_exit(int status)
{
	// close all open files
	_IO_cleanup();

	// exit with status code
	_kern_exit_team(status);
}
Esempio n. 2
0
void
exit(int status)
{
	// BeOS on exit notification for the main thread
	_thread_do_exit_work();

	// unwind the exit stack, calling the registered functions
	_exit_stack_lock();
	while (--sExitStackInfo.stack_size >= 0)
		(*sExitStackInfo.exit_stack[sExitStackInfo.stack_size])();
	_exit_stack_unlock();

	// close all open files
	_IO_cleanup();

	__gRuntimeLoader->call_termination_hooks();

	// exit with status code
	_kern_exit_team(status);
}
Esempio n. 3
0
 ~__io_defs() { _IO_cleanup (); }
int
__fcloseall ()
{
  /* Close all streams.  */
  return _IO_cleanup ();
}