/*ide
int main(int argc, char argv[])
{
pid_t pid;/此時僅有一個進程*/
if((pid=fork())<0)
{
printf("error in fork!");
exit(1);//fork出錯退出
}
else if(pid==0)
printf("Child process ID is %d\n",getpid());
else
printf("Parent process ID is %d\n",getpid());
//printf("Hello World!\n");
return 0;
}函數