The fork system call in UNIX and Linux systems

Note these considerations when using a fork system call in IBM MQ applications.

If the application wants to use fork, the parent process of that application should call fork before making any IBM MQ calls, for example, MQCONN, or creating an IBM MQ object using ImqQueueManager.

If the application wants to create a child process after making any IBM MQ calls, the application code must use a fork() with exec() to ensure that the child is a new instance, and not an exact copy of the parent.

If the application does not use exec(), the IBM MQ API call made within the child process returns MQRC_ENVIRONMENT_ERROR.

Parent topic: UNIX and Linux considerations