fork()怪象
April 16, 2007printf(”before fork”);
fork();
printf(”after fork”);
结果是:
before fork after fork before fork after fork
但是
如果第一个printf()改为prinf(”before fork\n”);
结果却是before只打印一次,奇怪。
printf(”before fork”);
fork();
printf(”after fork”);
结果是:
before fork after fork before fork after fork
但是
如果第一个printf()改为prinf(”before fork\n”);
结果却是before只打印一次,奇怪。
The URI to TrackBack this entry is: http://lwj.blogsome.com/2007/04/16/p20/trackback/
No comments yet.
RSS feed for comments on this post.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>