The OOB client connects to the OOB server during the call to SQLDriverConnect. After SQLDriverConnect returns, a socket is open between the client and server. If you then fork children they inherit the dbc and open socket. If the children use the dbc in further calls to SQL functions this will cause multiple processes to be sending data down the same socket. This just will not work. You need to make the call to SQLDriverConnect in each child.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.