From 42fb30298ca35786fb637a14d5c3381b86a5f774 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 8 Sep 2005 06:19:07 +0000 Subject: [PATCH] Fixed crash on AIX --- ext/odbc/php_odbc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index dc07182d52..83c45c1f13 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -508,6 +508,12 @@ PHP_MINIT_FUNCTION(odbc) REGISTER_LONG_CONSTANT("SQL_QUICK", SQL_QUICK, CONST_PERSISTENT | CONST_CS); #endif +#if defined(HAVE_IBMDB2) && defined(_AIX) + /* atexit() handler in the DB2/AIX library segfaults in PHP CLI */ + /* DB2NOEXITLIST env variable prevents DB2 from invoking atexit() */ + putenv("DB2NOEXITLIST=TRUE"); +#endif + return SUCCESS; } /* }}} */ -- 2.40.0