errexit.c
Upload User: wei_4586
Upload Date: 2008-05-28
Package Size: 18k
Code Size: 0k
Category:

Linux Network

Development Platform:

Unix_Linux

  1. /* errexit.c - errexit */
  2. #include <stdarg.h>
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. /*------------------------------------------------------------------------
  6.  * errexit - print an error message and exit
  7.  *------------------------------------------------------------------------
  8.  */
  9. int
  10. errexit(const char *format, ...)
  11. {
  12. va_list args;
  13. va_start(args, format);
  14. vfprintf(stderr, format, args);
  15. va_end(args);
  16. exit(1);
  17. }