2012-11-05 Pedro Alves <palves@redhat.com>

* gdb.base/foll-vfork.c (main): Call perror and _exit if execlp()
	fails.
This commit is contained in:
Pedro Alves 2012-11-05 16:23:36 +00:00
parent 80626a55b9
commit a7c8c9312a
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2012-11-05 Pedro Alves <palves@redhat.com>
* gdb.base/foll-vfork.c (main): Call perror and _exit if execlp()
fails.
2012-11-03 Yao Qi <yao@codesourcery.com>
Fix PR gdb/14617.

View File

@ -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);