Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meaning of "Detaching after fork from child process 15***"?

Tags:

when I use linux console to develop, I use gdb to trace the program's behavior, Always the console print "Detaching after fork from child process 15***." can any body help to explain the sentence in quotation mark? How and Who will do What jobs after Detaching from child process? Thanks first:)

like image 421
parsifal Avatar asked Nov 29 '10 01:11

parsifal


1 Answers

When GDB is debugging a particular process, and the process forks off a child process, GDB can only follow one of the two processes, so it must detach (stop following) the other. This line informs you of this selective detachment. The child process will run without being debugged by GDB.

You can select which process to follow using the set follow-fork-mode command. Use set follow-fork-mode child to follow child processes, and set follow-fork-mode parent to return to the default behavior. For more details, see this page on the Apple development website.

like image 137
Zeke Avatar answered Sep 27 '22 17:09

Zeke