#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
int main( int argc, char **argv ) {
pid_t child = 0;
child = fork();
if (child < 0) {
fprintf( stderr, "process failed to fork\n" );
return 1;
}
if (child == 0) {
wait(NULL);
}
else {
execl( "/bin/cp", "cp", "Arg1", "Arg2", NULL );
}
return 0;
}