|
#include <stdio.h>
#include <stdlib.h>
int main(int argc,char* argv)
{
if(argc!=3) exit(0);
else
{
int pid=fork();
if(pid==0)
{
printf("This is the son thread,and the char is %s\n",argv[1]);
}
else printf("This is the son thread,and the char is %s\n",argv[2]);
}
exit(0);
} |
|