All pastes #719914 Raw Edit

Unnamed

public c v1 · immutable
#719914 ·published 2007-09-29 19:26 UTC
rendered paste body
	cid = fork();	if(cid == -1) {		exit(-1);	}	if(cid == 0) {				exit_status = execlp(comando, comando, 0);		perror("execlp");		printf("Child exist status: %d\n", exit_status);		exit(exit_status);	} else {		wait(&status);		printf("Parent caught status: %d\n", status);		return status;	}