exec2.c File Reference

Include dependency graph for exec2.c:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 17 of file exec2.c.

00018 {
00019     int retval;
00020 
00021     tests_quiet( argc, argv );  /* Set TESTS_QUIET variable */
00022 
00023     if ( ( argc > 1 ) && ( strcmp( argv[1], "xxx" ) == 0 ) ) {
00024         retval = PAPI_library_init( PAPI_VER_CURRENT );
00025         if ( retval != PAPI_VER_CURRENT )
00026             test_fail( __FILE__, __LINE__, "execed PAPI_library_init", retval );
00027     } else {
00028         retval = PAPI_library_init( PAPI_VER_CURRENT );
00029         if ( retval != PAPI_VER_CURRENT )
00030             test_fail( __FILE__, __LINE__, "main PAPI_library_init", retval );
00031 
00032         if ( execlp( argv[0], argv[0], "xxx", NULL ) == -1 )
00033             test_fail( __FILE__, __LINE__, "execlp", PAPI_ESYS );
00034     }
00035 
00036     test_pass( __FILE__, NULL, 0 );
00037     exit( 1 );
00038 }

Here is the call graph for this function:


Generated on 26 Jan 2016 for PAPI by  doxygen 1.6.1