URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 107 |
Rev 1765 |
#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);
|
}
|
}
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.