Way cool



I don't know what this little program is doing but it's fun to watch.

#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>

main() {
int fd[2],num;
pid_t id;
id=num;
printf("%i",num);
pipe(fd);
id=vfork();
if(id==0) {
printf("success\n");
printf("%i",num);
}
close(fd[1]);
close(fd[0]);
return 0;
}

I wonder what the numbers that are changing is? The number that doesn't
change must be the process id.


Bill


.