Go to main content
Oracle® Developer Studio 12.5: Debugging a Program with dbx

Exit Print View

Updated: June 2016

Following the fork Function

If a child process calls the vfork(2), fork1(2), or fork(2) function, the process ID changes, but the process image stays the same, The behavior of dbx depends on how the dbxenv variable follow_fork_mode is set.


In the traditional behavior, dbx ignores the fork and follows the parent.


dbx automatically switches to the forked child using the new process ID. All connection to and awareness of the original parent is lost.


This mode is available only when using dbx through the Oracle Developer Studio IDE or dbxtool.


You are prompted to choose parent, child, both, or stop to investigate whenever dbx detects a fork. If you choose stop, you can examine the state of the program, then type cont to continue. You will be prompted again to select which way to proceed. both is supported only in the Oracle Developer Studio IDE and dbxtool.