1 Star 0 Fork 1

qingsonggege / openwrt_mt7688_ctest

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
nforktest.c 473 Bytes
一键复制 编辑 原始数据 按行查看 历史
Midas 提交于 2017-06-14 17:16 . add cc1101_tx.c and cc1101_rx.c
#include <stdio.h>
#include <stdlib.h> //--for exit()
//#include <unistd.h>
int main()
{
pid_t status;
int i;
for(i=0;i<10;i++)
{
status=fork();
if(status==0 || status==-1)break;
}
if(status==-1) //--parent
{
printf("Fork i=%d error!\n",i);
exit(0);
}
else if(status==0) //--child
{
printf("Fork i=%d successfully! pid=%d\n",i,getpid());
exit(0);
}
else //--parent
{
printf("This is parent! final status=%d\n",status);
}
return 0;
exit(0);
}
1
https://gitee.com/qingsonggege/openwrt_mt7688_ctest.git
git@gitee.com:qingsonggege/openwrt_mt7688_ctest.git
qingsonggege
openwrt_mt7688_ctest
openwrt_mt7688_ctest
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891