@xabean yeah i assume setenv is not thread safe, but i assume that if i fork a process i can setenv before calling execvp.. turns out it's not the case. POSIX is full of traps, in macos fork(2) manpage explains that in the last section. it's like a limbo for anything that's not listed in man 7 signal-safety.