Index: ossp-pkg/lmtp2nntp/lmtp2nntp.c RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp2nntp.c,v rcsdiff -q -kk '-r1.78' '-r1.79' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp2nntp.c,v' 2>/dev/null --- lmtp2nntp.c 2001/10/11 08:01:37 1.78 +++ lmtp2nntp.c 2001/10/11 15:46:48 1.79 @@ -940,8 +940,10 @@ lmtp_destroy(lmtp); } else { pid = getpid(); - if (ctx->option_daemon) + if (ctx->option_daemon) { daemonize(); + log1(ctx, NOTICE, "daemonized, previous pid[%d]", pid); l2_stream_flush(ctx->l2); + } if (ctx->option_pidfile != NULL) { if ((fd = fopen(ctx->option_pidfile, "w+")) == NULL) log1(ctx, ERROR, "cannot open pidfile \"%s\" for writing %m", ctx->option_pidfile); @@ -950,7 +952,6 @@ fclose(fd); } } - log1(ctx, NOTICE, "startup daemonized, previous pid[%d]", pid); l2_stream_flush(ctx->l2); sa_timeout(ctx->saAltio, SA_TIMEOUT_ALL, 0, 0); sa_timeout(ctx->saAltio, SA_TIMEOUT_ACCEPT, ctx->option_timeout_lmtp_accept, 0); @@ -1063,6 +1064,10 @@ lmtp_destroy(lmtp); CU(0); } + if (rc == SA_ERR_SYS) + log3(ctx, ERROR, "accept failed: %s: (%d) %s", sa_error(rc), errno, strerror(errno)); + else + log1(ctx, ERROR, "accept failed: %s", sa_error(rc)); } CU(0);