OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.3/] [gdb/] [testsuite/] [gdb.base/] [foll-exec.c] - Rev 1765

Compare with Previous | Blame | View Log

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
 
 
int  global_i = 100;
 
#ifdef PROTOTYPES
int main (void)
#else
main ()
#endif
{
  int  local_j = global_i+1;
  int  local_k = local_j+1;
 
  printf ("foll-exec is about to execlp(execd-prog)...\n");
 
  execlp ("gdb.base/execd-prog",
          "gdb.base/execd-prog",
          "execlp arg1 from foll-exec",
          (char *)0);
 
  printf ("foll-exec is about to execl(execd-prog)...\n");
 
  execl ("gdb.base/execd-prog",
         "gdb.base/execd-prog",
         "execl arg1 from foll-exec",
         "execl arg2 from foll-exec",
         (char *)0);
 
  {
    static char * argv[] = {
      (char *)"gdb.base/execd-prog",
      (char *)"execv arg1 from foll-exec",
      (char *)0};
 
    printf ("foll-exec is about to execv(execd-prog)...\n");
 
    execv ("gdb.base/execd-prog", argv);
  }
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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