I need to run several parallel processes, each executing a set of functions. Like this:

```
import multiprocessing as mp  

data = [set1, set2, set3]  
functions = [func1, func2, func3, func4]  
# each func is run in its own separate directory

def myProcess(dataset, functions_list):  
    for func in functions_list:  
        func(dataset)  

for set_i in data:  
    p = mp.Process(target = myProcess, args = (set_i, functions))  
    p.start()  

```

The problem is that each function in the `functions` list needs to be run in its separate directory. And `os.chdir` switches the directory for all processes being run, as far as I know. How can I ensure that each process safely runs in an appropriate directory without suddenly being kicked out of it by another one?