As we know, it's only possible to change the environmental variable set of a process in some time after the
fork() system call and before
exec(), e.g. manipulation like this is possible only from parent to child through the appropriate API.
However, when we use bash and it's
export built-in, bash somehow changes the environmental variables of the current process (instance of the shell).
How this is done? Does it use some nasty hack?