#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
pid_t cocuk_pid;
printf("Parent process id = %d\n", (int)getpid() );
cocuk_pid=fork();
if (cocuk_pid!=0)
{
printf("burası parenttir , process id =%d\n",(int)getpid());
printf("child process id = %d\n",(int)cocuk_pid);
}
else
{
printf("burası child processdir, process id=%d\n", (int)getpid());
}
return 0;
}
Hiç yorum yok:
Yorum Gönder