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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [gdb/] [testsuite/] [gdb.base/] [foll-exec.c] - Blame information for rev 321

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 jeremybenn
#include <stdio.h>
2
#include <stdlib.h>
3
#include <unistd.h>
4
#include <string.h>
5
 
6
 
7
int  global_i = 100;
8
 
9
#ifdef PROTOTYPES
10
int main (void)
11
#else
12
main ()
13
#endif
14
{
15
  int  local_j = global_i+1;
16
  int  local_k = local_j+1;
17
 
18
  printf ("foll-exec is about to execlp(execd-prog)...\n");
19
 
20
  execlp ("gdb.base/execd-prog",
21
          "gdb.base/execd-prog",
22
          "execlp arg1 from foll-exec",
23
          (char *)0);
24
 
25
  printf ("foll-exec is about to execl(execd-prog)...\n");
26
 
27
  execl ("gdb.base/execd-prog",
28
         "gdb.base/execd-prog",
29
         "execl arg1 from foll-exec",
30
         "execl arg2 from foll-exec",
31
         (char *)0);
32
 
33
  {
34
    static char * argv[] = {
35
      (char *)"gdb.base/execd-prog",
36
      (char *)"execv arg1 from foll-exec",
37
      (char *)0};
38
 
39
    printf ("foll-exec is about to execv(execd-prog)...\n");
40
 
41
    execv ("gdb.base/execd-prog", argv);
42
  }
43
}

powered by: WebSVN 2.1.0

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