whutxuan
驱动小牛
驱动小牛
  • 注册日期2002-03-05
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分10分
  • 威望1点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
阅读:806回复:2

进程的问题!!!

楼主#
更多 发布于:2003-03-14 16:18
pid_t pid;
pid=fork()

if (pid<0)
{
  printf(\"errno\");
}
if(pid==0)
{
//调用一个函数,在这个函数的内部也开了很多进程。
}
else
{
//等待进程结束,应该怎么实现呢???
}
heehaw
驱动小牛
驱动小牛
  • 注册日期2003-03-20
  • 最后登录2005-04-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2003-03-20 09:05
wait(pid) ;)
我热爱生命,但面对现实的社会经常感到无奈,所以只有嘿嘿傻笑 我迷恋科技,但飞速发展的世界使我眼花缭乱,所以必须埋头苦练
hometown
驱动大牛
驱动大牛
  • 注册日期2002-10-24
  • 最后登录2004-05-21
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2003-03-14 16:28
参看 man wait
How fair and how pleasant art thou, O love, for delights!This thy stature is like to a palm tree, and thy breasts to clusters of grapes.I said, I will go up to the palm tree, I will take hold of the boughs thereof: now also thy breasts shall be as clusters of the vine, and the smell of thy nose like apples;And the roof of thy mouth like the best wine for my beloved, that goeth down sweetly, causing the lips of those that are asleep to speak.
游客

返回顶部