A NOTE has been added to this issue. ====================================================================== http://www.dbmail.org/mantis/view.php?id=885 ====================================================================== Reported By: vampyre Assigned To: ====================================================================== Project: DBMail Issue ID: 885 Category: Database layer Reproducibility: always Severity: trivial Priority: normal Status: new target: ====================================================================== Date Submitted: 14-Mar-11 15:22 CET Last Modified: 15-Mar-11 13:53 CET ====================================================================== Summary: dbmail fail in core in case if no db connection available on start Description: I have faced this issue with MySQL. The issue is rather trivial but still, if there is no connection to DB, we get core dump in dm_db.c, db_connect: .... ConnectionPool_start(pool); TRACE(TRACE_DATABASE, "database connection pool started with [%d] connections, max [%d]", ConnectionPool_getInitialConnections(pool), ConnectionPool_getMaxConnections(pool)); ....
This is due to ConnectionPool_setAbortHandler is not set for libzdb so abort() is triggered. I think it is better just to exit with some nonzero exit status. ====================================================================== ---------------------------------------------------------------------- (0003172) hauk (reporter) - 15-Mar-11 13:53 http://www.dbmail.org/mantis/view.php?id=885#c3172 ---------------------------------------------------------------------- > I think it is better just to exit with some nonzero exit status. IMHO it is not. Having a core file is a good thing incase of a fatal error, so I would recommend not setting an abort handler in DBMail. However to allow for some control I've changed libzdb to only abort if the debug flag is set, otherwise it'll call exit(1) unless an AbortHandler is set. Issue History Date Modified Username Field Change ====================================================================== 14-Mar-11 15:22 vampyre New Issue 15-Mar-11 13:53 hauk Note Added: 0003172 ====================================================================== _______________________________________________ Dbmail-dev mailing list [email protected] http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev
