I'm really curious why they're using setenv(3) so much. The main usages that I can think of is setting an environment variable before calling something like exec(3). That doesn't seem to be the case here.
The article mentions that they use exevpe for spawning children processes. So what usages of setenv(3) would remain?