fork() system call in c

前端 未结 5 1726
孤城傲影
孤城傲影 2021-01-01 06:17
    #include 
    #include 
    int main()
    {
       fork();
       fork() && fork() || fork();
       fork();

     printf         


        
5条回答
  •  一向
    一向 (楼主)
    2021-01-01 06:34

    Save the file, say as fork-count.c. Then compile it with gcc fork-count.c -o fork-count. Then you can run it and count the number of lines of output with ./fork-count | wc -l.

提交回复
热议问题