zoukankan      html  css  js  c++  java
  • fork的微妙问题1

       1:  /*
       2:  Author:Justinzhang
       3:  email:uestczhangchao@gmail.com
       4:  time:2012-8-30 22:17:23
       5:  desc:fork problem, from www.qshpan.com
       6:  */
       7:   
       8:  #include <stdio.h>
       9:  #include <stdlib.h>
      10:  int sum;
      11:  int main()
      12:  {
      13:      int i = 0;
      14:      sum = 0;
      15:      fork();
      16:      for(i=0; i<5; i++)
      17:      {
      18:          printf("%d\n",i);
      19:          fflush(stdout);
      20:          sum += i;
      21:      }
      22:      printf("sum = %d\n", sum);
      23:      
      24:      exit(0);
      25:  }
  • 相关阅读:
    web安全-接入层注入
    web安全-密码安全
    web安全-传输安全
    Jenkins-安装
    RobotFramework-关键字
    RobotFramework-调用.py文件
    RobotFramework-登录
    SQL-行转列(PIVOT)实例1
    SQL-AdventureWorks样例数据库
    TestDescription文档描述测试过程
  • 原文地址:https://www.cnblogs.com/justinzhang/p/2667193.html
Copyright © 2011-2022 走看看