/*    main program illustrating the UNIX fork() system call. 
Compile using cc -o main main.c
*/
#include <stdio.h>
main() {
	if (fork() != 0) {
		if (fork() != 0) {
			printf("hello1 %i\n", getpid());
		}
		else {
			fork();
		}
		printf("hello2 %i\n", getpid());
	}
	else {
		if (fork != 0) {
			printf("hello3 %i\n", getpid());
		}
		else {
			fork();
		}
		printf("hello4 %i\n", getpid());
	}
	printf("hello5 %i\n", getpid());
} 