From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23320 invoked by alias); 5 Nov 2012 19:06:09 -0000 Received: (qmail 23300 invoked by uid 48); 5 Nov 2012 19:06:08 -0000 From: "palves at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/14808] New: vfork, follow-fork child, detach-on-fork on, child execs, parent changes executable too (but should not) Date: Mon, 05 Nov 2012 19:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: palves at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2012-q4/txt/msg00184.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14808 Bug #: 14808 Summary: vfork, follow-fork child, detach-on-fork on, child execs, parent changes executable too (but should not) Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb AssignedTo: unassigned@sourceware.org ReportedBy: palves@redhat.com Classification: Unclassified $ ./gdb -q ./testsuite/gdb.base/foll-vfork -ex "cd testsuite" -ex "set follow-fork child" -ex "set detach-on-fork on" (gdb) r Starting program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.base/foll-vfork [New process 2497] I'm the child! I'm the proud parent of child #2497! process 2497 is executing new program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.base/vforked-prog Hello from vforked-prog... [Inferior 2 (process 2497) exited normally] (gdb) info inferiors Num Description Executable * 2 /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.base/vforked-prog 1 /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.base/vforked-prog ^^^^^^^^^^^^ (gdb) Note how inferior 1 (the parent)'s executable changed to "vforked-prog" too... Only the child's executable should have changed in reaction to the exec. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.