fork() : rts64 : Error 96 encountered in child process

over 2 years ago


In Server Express I could use the fork() call. Now, with Visual Cobol, I encounter ‘rts64 : Error 96 encountered in child process’ failure.



Error 96 was introduced in Visual Cobol in response to error situations which customers reported regarding thread synchronisation and deadlocks. There are, and always have been, good reasons for the limitation with fork(), and the principle has always applied – in all versions of Net Express, Server Express, and now Visual COBOL and Enterprise Developer. In practice, earlier versions such as Server Express did not trap improper uses of fork() and that appeared to work in a limited fashion, but this has become increasingly problematic over time as OS vendors tighten up over successive releases. With the latest products, it was realised that continuing the effort was not sustainable. Therefore raising the RTS 96 error early avoids a potentially long investigation on later runtime errors.


The general advice, not specific to Micro Focus, is to avoid fork() and call, but instead use fork() and exec(). As an example, refer to the Posix documentation at:

The Micro Focus documentation can be found here:

Refer to Section  'COBRT096 Invalid use of fork() (Fatal)' :

“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”.

Alternatively, the CBL_EXEC_RUN_UNIT API can be used instead to create a child process. See here:

This is a positive step in contributing to stability for customers when deploying Micro Focus Products.

Comment List
Related Discussions