If a process has used COBOL functionality, it can only safely call fork() if the child then safely calls one of the exec() set of APIs. If an error occurs in the child, it should call _exit(), not exit().
When the fork() API is called, the operating system only creates one thread in the child process. If the parent had multiple threads at the time of the fork(), thread synchronisation objects, such as mutexes, may have been locked in another thread, which could lead to deadlocks in the child if the child used those thread synchronisation objects.