aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-11-05 16:23:36 +0000
committerPedro Alves <palves@redhat.com>2012-11-05 16:23:36 +0000
commita7c8c9312a88f65ecb43c28c5fba6f26aa87ba5b (patch)
tree6fd95eebb35cf60ce851f1fc158132cd506eb782 /gdb/testsuite/gdb.base
parent80626a55b99a0cb91546f334fc683f7a9f351101 (diff)
downloadgdb-a7c8c9312a88f65ecb43c28c5fba6f26aa87ba5b.zip
gdb-a7c8c9312a88f65ecb43c28c5fba6f26aa87ba5b.tar.gz
gdb-a7c8c9312a88f65ecb43c28c5fba6f26aa87ba5b.tar.bz2
2012-11-05 Pedro Alves <palves@redhat.com>
* gdb.base/foll-vfork.c (main): Call perror and _exit if execlp() fails.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r--gdb/testsuite/gdb.base/foll-vfork.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/foll-vfork.c b/gdb/testsuite/gdb.base/foll-vfork.c
index 3bb37ad..85c5493 100644
--- a/gdb/testsuite/gdb.base/foll-vfork.c
+++ b/gdb/testsuite/gdb.base/foll-vfork.c
@@ -30,6 +30,8 @@ main ()
if (pid == 0) {
printf ("I'm the child!\n");
execlp ("gdb.base/vforked-prog", "gdb.base/vforked-prog", (char *)0);
+ perror ("exec failed");
+ _exit (1);
}
else {
printf ("I'm the proud parent of child #%d!\n", pid);