Rafael Zalamena <[email protected]> writes:

> This diff removes all "extern struct snmpd *" lines from source files,
> replaces all 'env' occurences with 'snmpd_env' and adds the extern
> declaration for snmpd_env in the snmpd.h header.
>
> With this diff we only need to guarantee that this variable is set,
> we avoid shadowing other 'env' variables and we diminish the confusion
> about this env variable thing.
>
> We need this diff (or something with the same effect) to proceed with
> fork+exec, because jca@ found out that traphandler child process do not
> set env. We could alternatively just set env in traphandler p_init() and
> remove snmpd_env, however it looks cleaner to me to not have all this
> extern in all .c files and have a propper name for 'env'.

It looks cleaner to me too.  IIUC we could go further and remove all
local env variables, ps_env, cs_env, etc.  Anyway, I think it's already
an improvement.

> ok?

Looks fine and works fine in my tests, ok jca@

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to