abort.c 396 B

123456789101112131415161718192021
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. #if defined(_POSIX_SOURCE)
  7. #include <sys/types.h>
  8. #endif
  9. #include <signal.h>
  10. #include <stdlib.h>
  11. extern void (*_clean)(void);
  12. void
  13. abort(void)
  14. {
  15. if (_clean) _clean(); /* flush all output files */
  16. raise(SIGABRT);
  17. }