Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / gdb6 / gdb / testsuite / gdb.base / execd-prog.c
blob5469f656c0c5ea7fabdfb015622d5daef59421f9
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <unistd.h>
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 */
9 int global_i = 0;
11 #ifdef PROTOTYPES
12 int main (int argc, char **argv)
13 #else
14 main (argc, argv)
15 int argc;
16 char * argv[];
17 #endif
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.
23 int local_j = argc;
24 char * s;
26 printf ("Hello from execd-prog...\n");
27 if (argc != 2)
29 printf ("expected one string argument\n");
30 exit (-1);
32 s = argv[1];
33 printf ("argument received: %s\n", s);