OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gdb/] [gdb-6.8/] [gdb-6.8.openrisc-2.1/] [gdb/] [testsuite/] [gdb.base/] [foll-vfork.c] - Diff between revs 24 and 33

Only display areas with differences | Details | Blame | View Log

Rev 24 Rev 33
#include <stdio.h>
#include <stdio.h>
#include <unistd.h>
#include <unistd.h>
 
 
#ifdef PROTOTYPES
#ifdef PROTOTYPES
int main (void)
int main (void)
#else
#else
main ()
main ()
#endif
#endif
{
{
  int  pid;
  int  pid;
 
 
  pid = vfork ();
  pid = vfork ();
  if (pid == 0) {
  if (pid == 0) {
    printf ("I'm the child!\n");
    printf ("I'm the child!\n");
    execlp ("gdb.base/vforked-prog", "gdb.base/vforked-prog", (char *)0);
    execlp ("gdb.base/vforked-prog", "gdb.base/vforked-prog", (char *)0);
  }
  }
  else {
  else {
    printf ("I'm the proud parent of child #%d!\n", pid);
    printf ("I'm the proud parent of child #%d!\n", pid);
  }
  }
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.