• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/gdb/gdb/testsuite/gdb.base/
1#include <stdio.h>
2#include <stdlib.h>
3#include <unistd.h>
4
5/* There is a global_i in foll-exec, which exec's us.  We
6   should not be able to see that other definition of global_i
7   after we are exec'd.
8   */
9int  global_i = 0;
10
11#ifdef PROTOTYPES
12int main (int argc, char **argv)
13#else
14main (argc, argv)
15  int  argc;
16  char *  argv[];
17#endif
18{
19  /* There is a local_j in foll-exec, which exec's us.  We
20     should not be able to see that other definition of local_j
21     after we are exec'd.
22     */
23  int  local_j = argc;
24  char *  s;
25
26  printf ("Hello from execd-prog...\n");
27  if (argc != 2)
28    {
29      printf ("expected one string argument\n");
30      exit (-1);
31    }
32  s = argv[1];
33  printf ("argument received: %s\n", s);
34}
35