Esempio n. 1
0
void add_file(char *p)
{
	char *x = strrchr(p, '.');
	if (x == NULL)
		dunno(p);
	switch (x[1]) {
	case 'a':
		append_obj(&objlist, p, TYPE_A);
		break;
	case 's':
		append_obj(&objlist, p, TYPE_s);
		break;
	case 'S':
		append_obj(&objlist, p, TYPE_S);
		break;
	case 'c':
		/* HACK should be TYPE_C once we split cpp */
		append_obj(&objlist, p, TYPE_C_pp);
		c_files++;
		break;
	case 'o':
		append_obj(&objlist, p, TYPE_O);
		break;
	default:
		dunno(p);
	}
}
Esempio n. 2
0
void *bunno(){

	for(;;){
			pid_t pid;
			pid =fork();
			dunno();
			wait(0);
		}
}
Esempio n. 3
0
int main(){
	pid_t pid;
	pid =fork();
	if(pid > 0){
		bunno();
	}
	if(pid == 0){
		dunno();
	}
	return 0;

}