7 ** This is used to print out error messages and exit
17 /*-------------------------------------------------------------------------
19 ** halt - print error message, and call clean up routine or exit
21 **------------------------------------------------------------------------*/
25 halt(const char *format
,...)
31 va_start(arg_ptr
, format
);
32 if (strncmp(format
, "PERROR", 6) != 0)
33 vfprintf(stderr
, format
, arg_ptr
);
36 for (pstr
= format
+ 6; *pstr
== ' ' || *pstr
== ':'; pstr
++)
38 vfprintf(stderr
, pstr
, arg_ptr
);
44 /* call one clean up function if defined */
45 if ((sig_func
= signal(SIGTERM
, SIG_DFL
)) != SIG_DFL
&&
48 else if ((sig_func
= signal(SIGHUP
, SIG_DFL
)) != SIG_DFL
&&
51 else if ((sig_func
= signal(SIGINT
, SIG_DFL
)) != SIG_DFL
&&
54 else if ((sig_func
= signal(SIGQUIT
, SIG_DFL
)) != SIG_DFL
&&