XuWeixin created TRAFODION-2709:
-----------------------------------
Summary: Using multi-threads app with linux-odbc to connect
trafodion will make dcs down
Key: TRAFODION-2709
URL: https://issues.apache.org/jira/browse/TRAFODION-2709
Project: Apache Trafodion
Issue Type: Bug
Components: client-odbc-linux
Affects Versions: 2.1-incubating, 2.2-incubating
Environment: centos 6.7
centos 7.2
Reporter: XuWeixin
Fix For: 2.2-incubating
getpwuid is not a Thread-safe function
// Get client user name.
struct passwd *passwd; /* man getpwuid */
passwd = getpwuid (getuid()); /* Get the uid of the running processand
use it to get a record from /etc/passwd */
if (strlen(passwd->pw_name) > 0)
{
inContext.clientUserName = passwd->pw_name;
inContext.inContextOptions1 = inContext.inContextOptions1 |
INCONTEXT_OPT1_CLIENT_USERNAME;
}
else
inContext.clientUserName = NULL;
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)