Description of problem: Currently any fork(2)ed child processes get out of GDB tracking which may be unexpected by the GDB user. It has been proven on Bug 234468. Version-Release number of selected component (if applicable): gdb-6.5-16.el5.ia64 +RawHide +upstream How reproducible: Always. Steps to Reproduce: 1. gcc -o dinner dinner.c -Wall -ggdb3 2. gdb ./dinner 3. (gdb) break knife 4. (gdb) run Actual results: Starting program: /root/jkratoch/redhat/dinner knife Program exited normally. Expected results: As one originally expects as after `set follow-fork-mode child': Breakpoint 1, knife () at dinner.c:11 11 puts ("knife"); (gdb) It would be helpful to get at least: Starting program: /root/jkratoch/redhat/dinner Detaching after fork from child process 11836. knife Program exited normally. Additional info: Patch is a trivial oneliner. Slightly different GDB output may be considered a Regression.
Created attachment 151656 [details] Trivial testcase.
Committed to RawHide incl. the testcase `gdb.base/fork-detach.exp': * Sun Apr 22 2007 Jan Kratochvil <jan.kratochvil> - 6.6-10 - Notify user of a child forked process being detached (BZ 235197).
Posted upstream: http://sources.redhat.com/ml/gdb-patches/2007-12/msg00087.html
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2008-0332.html
(In reply to Jan Kratochvil from comment #7) > Posted upstream: > http://sources.redhat.com/ml/gdb-patches/2007-12/msg00087.html The above patch is apparently superseded by this one: https://sourceware.org/ml/gdb-patches/2018-04/msg00392.html