如果一个子进程调用 vfork(2)、fork1(2) 或 fork(2) 函数,则进程 ID 会更改,但进程映像保持不变。dbx 的行为取决于 dbxenv 变量 follow_fork_mode 的设置方式。
在传统行为中,dbx 将忽略派生而跟随父进程。
dbx 自动切换到使用新进程 ID 的派生子进程。到原始父进程的所有连接以及对该进程的所有认知均丢失。
此模式仅当通过 Oracle Solaris Studio IDE 或 dbxtool 使用 dbx 时才可用。
只要 dbx 检测到派生,便会提示您选择 parent、child、both 或 stop to investigate。如果选择 stop,则可检查程序的状态,然后键入 cont 继续。系统会再次提示您选择继续的方式。只有 Oracle Solaris Studio IDE 和 dbxtool 支持 both。