]> Git Repo - binutils.git/blobdiff - gdb/testsuite/gdb.base/foll-vfork.c
GDB testsuite: drop non-prototype C function header variants
[binutils.git] / gdb / testsuite / gdb.base / foll-vfork.c
index 3bb37ad4e27a256c2dc635cf34be84c6a2210878..933ce38b9549f213b27d6363b2ef14388c4b9a4d 100644 (file)
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1997, 1999, 2007-2012 Free Software Foundation, Inc.
+   Copyright 1997-2014 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include <stdio.h>
 #include <unistd.h>
 
-#ifdef PROTOTYPES
 int main (void)
-#else
-main ()
-#endif
 {
   int  pid;
 
   pid = vfork ();
   if (pid == 0) {
     printf ("I'm the child!\n");
-    execlp ("gdb.base/vforked-prog", "gdb.base/vforked-prog", (char *)0);
+    execlp (BASEDIR "/vforked-prog", BASEDIR "/vforked-prog", (char *)0);
+    perror ("exec failed");
+    _exit (1);
   }
   else {
     printf ("I'm the proud parent of child #%d!\n", pid);
This page took 0.024244 seconds and 4 git commands to generate.