Github user selvaganesang commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/929#discussion_r97918415
--- Diff: core/sqf/monitor/linux/process.cxx ---
@@ -1317,7 +1318,11 @@ bool CProcess::Create (CProcess *parent, int &
result)
env = getenv ("TERM");
STRCPY (term, (env?env:"ansi"));
env = getenv ("TZ");
- STRCPY (tz, (env?env:""));
+ tz_exists = (env != NULL);
+ if (tz_exists)
+ {
+ STRCPY (tz, env); // see note regarding TZ below
+ }
env = getenv ("USER");
STRCPY (user, (env?env:""));
env = getenv ("HOME");
--- End diff --
Though it is in surround code, I thought that I would mention this. I
think getenv is an expensive call that needs to be avoided in this part of code.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---