Go to the source code of this file.
◆ main()
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 31 of file forkexec4.c.
32{
34 int status;
36
37
39
40 if ( ( argc > 1 ) && ( strcmp( argv[1], "xxx" ) == 0 ) ) {
41
45 }
46 return 0;
47 } else {
48 if (!
quiet) printf(
"Testing Init/fork/exec/Init\n");
49
50
54 }
55
56 if ( fork( ) == 0 ) {
57
60 test_fail( __FILE__, __LINE__,
"forked PAPI_library_init",
62 }
63
64 if ( execlp( argv[0], argv[0], "xxx", NULL ) == -1 ) {
66 }
67 } else {
68
69 wait( &status );
70 if ( WEXITSTATUS( status ) != 0 ) {
71 test_fail( __FILE__, __LINE__,
"fork", WEXITSTATUS( status ) );
72 } }
73 }
74
76
77 return 0;
78}
initialize the PAPI library.
int tests_quiet(int argc, char **argv)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
void PAPI_NORETURN test_pass(const char *filename)