Article View: comp.unix.internals
Article #2392printf() & fork() ......
From: Ming-Chuan Huang
Date: Thu, 19 Nov 1992 13:30
Date: Thu, 19 Nov 1992 13:30
34 lines
1012 bytes
1012 bytes
Hello:
#include <stdio.h>
program 1:
void main()
{
printf("Hello ");
if (fork() == 0)
printf("world\n");
}
result:
Hello Hello world
program 2:
void main()
{
printf("Hello \n");
if (fork() == 0)
printf("world\n");
}
result:
Hello
world
is there anybody who knows the difference between the two programs ?
mchuang
mchuang@csie.nctu.edu.tw
Technical Details
Message-ID:
<1992Nov19.133035.172@ccsun7.csie.nctu.edu.tw>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!news.edu.tw!news!ccsun7.csie.nctu.edu.tw!mchuangShow Full Headers
Complete Article Headers
Newsgroups: comp.unix.internals Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!news.edu.tw!news!ccsun7.csie.nctu.edu.tw!mchuang From: mchuang@csie.nctu.edu.tw (Ming-Chuan Huang) Subject: printf() & fork() ...... Message-ID: <1992Nov19.133035.172@ccsun7.csie.nctu.edu.tw> Sender: usenet@ccsun7.csie.nctu.edu.tw Organization: Computer Science & Information Engin., Chiao-Tung U, Taiwan, ROC X-Newsreader: TIN [version 1.1 PL6] Date: Thu, 19 Nov 1992 13:30:35 GMT Lines: 34