public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/14808] New: vfork, follow-fork child, detach-on-fork on, child execs, parent changes executable too (but should not)
@ 2012-11-05 19:06 palves at redhat dot com
  2014-05-01 21:08 ` [Bug gdb/14808] " donbreazeal at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: palves at redhat dot com @ 2012-11-05 19:06 UTC (permalink / raw)
  To: gdb-prs

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    <null>           
/home/pedro/gdb/mygit/build/gdb/testsuite/gdb.base/vforked-prog 
  1    <null>           
/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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-04 18:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-05 19:06 [Bug gdb/14808] New: vfork, follow-fork child, detach-on-fork on, child execs, parent changes executable too (but should not) palves at redhat dot com
2014-05-01 21:08 ` [Bug gdb/14808] " donbreazeal at gmail dot com
2014-05-01 21:16 ` donbreazeal at gmail dot com
2014-05-06 22:18 ` donbreazeal at gmail dot com
2014-06-04 18:17 ` donbreazeal at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).