From 90b45fcbbd92c122e1c2fecf3ca2d51080ee471e Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 8 Sep 2005 06:18:47 +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.50.1