Go to the source code of this file.
◆ main()
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 32 of file forkexec.c.
33{
36 int status;
37
38
40
41 if ( ( argc > 1 ) && ( strcmp( argv[1], "xxx" ) == 0 ) ) {
42
46 }
47 return 0;
48 } else {
49 if (!
quiet) printf(
"Test fork/exec/PAPI_init\n");
50
54 }
55
57
58 if ( fork( ) == 0 ) {
59
60 if ( execlp( argv[0], argv[0], "xxx", NULL ) == -1 ) {
62 }
63 } else {
64
65 wait( &status );
66 if ( WEXITSTATUS( status ) != 0 ) {
67 test_fail( __FILE__, __LINE__,
"fork", WEXITSTATUS( status ) );
68 }
69 }
70 }
71
73
74 return 0;
75
76}
initialize the PAPI library.
Finish using PAPI and free all related resources.
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)