public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "dje at google dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/16953] New: New inferior for each rerun of a simple fork/exec of hello, where hello binary is missing. Date: Fri, 16 May 2014 17:48:00 -0000 [thread overview] Message-ID: <bug-16953-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=16953 Bug ID: 16953 Summary: New inferior for each rerun of a simple fork/exec of hello, where hello binary is missing. Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: dje at google dot com fork-exec-hello.c: #include <stdlib.h> #include <unistd.h> #include <wait.h> const char hello[] = "./hello.x64"; int main () { int child; int status; child = fork (); if (child < 0) { perror ("fork"); exit (1); } if (child == 0) { execl (hello, hello, NULL); perror ("execl"); } else { waitpid (child, &status, 0); } return 0; } hello.c: well, you know ... With hello.x64 binary missing: (gdb) set follow-fork child (gdb) r Starting program: /home/dje/src/play/fork-exec-hello.x64 [New process 6671] execl: No such file or directory [Inferior 2 (process 6671) exited normally] (gdb) i inf Num Description Executable * 2 <null> /home/dje/src/play/fork-exec-hello.x64 1 <null> /home/dje/src/play/fork-exec-hello.x64 (gdb) r Starting program: /home/dje/src/play/fork-exec-hello.x64 [New process 6674] execl: No such file or directory [Inferior 3 (process 6674) exited normally] (gdb) i inf Num Description Executable * 3 <null> /home/dje/src/play/fork-exec-hello.x64 2 <null> /home/dje/src/play/fork-exec-hello.x64 1 <null> /home/dje/src/play/fork-exec-hello.x64 (gdb) r Starting program: /home/dje/src/play/fork-exec-hello.x64 [New process 6677] execl: No such file or directory [Inferior 4 (process 6677) exited normally] (gdb) i inf Num Description Executable * 4 <null> /home/dje/src/play/fork-exec-hello.x64 3 <null> /home/dje/src/play/fork-exec-hello.x64 2 <null> /home/dje/src/play/fork-exec-hello.x64 1 <null> /home/dje/src/play/fork-exec-hello.x64 (gdb) -- You are receiving this mail because: You are on the CC list for the bug.
reply other threads:[~2014-05-16 17:48 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-16953-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).