summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5a12e4b)
atexit needs nonstatic functions to work correct. The
error check is importent, because atexit can fail for
some reasons and the cleanup woulden't work.
/* copy of mail directory because the static gets overwritten */
char *maildir_copy = NULL;
/* copy of mail directory because the static gets overwritten */
char *maildir_copy = NULL;
+ if (atexit(inc_done) != 0) {
+ adios(NULL, "atexit failed");
+ }
/*
** absolutely the first thing we do is save our privileges,
/*
** absolutely the first thing we do is save our privileges,
inc_done()
{
if (locked) {
inc_done()
{
if (locked) {
static char outfile[BUFSIZ];
static int unlink_outfile = 0;
static char outfile[BUFSIZ];
static int unlink_outfile = 0;
-static void unlink_done();
/* mhoutsbr.c */
int output_message(CT, char *);
/* mhoutsbr.c */
int output_message(CT, char *);
FILE *fp = NULL;
FILE *fp_out = NULL;
FILE *fp = NULL;
FILE *fp_out = NULL;
+ if (atexit(unlink_done) != 0) {
+ adios(NULL, "atexit failed");
+ }
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
struct msgs *mp = NULL;
CT ct, *ctp;
struct msgs *mp = NULL;
CT ct, *ctp;
+ if (atexit(freects_done) != 0) {
+ adios(NULL, "atexit failed");
+ }
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
+ if (atexit(freects_done) != 0) {
+ adios(NULL, "atexit failed");
+ }
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
+ if (atexit(freects_done) != 0) {
+ adios(NULL, "atexit failed");
+ }
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
struct msgs *mp = NULL;
CT ct, *ctp;
struct msgs *mp = NULL;
CT ct, *ctp;
+ if (atexit(freects_done) != 0) {
+ adios(NULL, "atexit failed");
+ }
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
-static void putzero_done();
int
main(int argc, char **argv)
int
main(int argc, char **argv)
struct msgs *mp;
register FILE *fp;
struct msgs *mp;
register FILE *fp;
+ if (atexit(putzero_done) != 0) {
+ adios(NULL, "atexit failed");
+ }
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
putzero_done()
{
if (listsw && !isatty(fileno(stdout)))
putzero_done()
{
if (listsw && !isatty(fileno(stdout)))
** prototypes
*/
static void rcvdistout(FILE *, char *, char *);
** prototypes
*/
static void rcvdistout(FILE *, char *, char *);
-static void unlink_done();
FILE *fp;
char *tfile = NULL;
FILE *fp;
char *tfile = NULL;
+ if (atexit(unlink_done) != 0) {
+ adios(NULL, "atexit failed");
+ }
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
unlink_done()
{
if (*backup) {
unlink_done()
{
if (*backup) {
*/
static char *tmpfilenam = NULL;
*/
static char *tmpfilenam = NULL;
-static void unlink_done();
int
main(int argc, char **argv)
int
main(int argc, char **argv)
struct msgs *mp;
struct stat st;
struct msgs *mp;
struct stat st;
+ if (atexit(unlink_done) != 0) {
+ adios(NULL, "atexit failed");
+ }
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
/*
** Clean up and exit
*/
/*
** Clean up and exit
*/
unlink_done()
{
if (tmpfilenam && *tmpfilenam) {
unlink_done()
{
if (tmpfilenam && *tmpfilenam) {