<span style="background-color:#eeeeee;"><font face="돋움, Dotum, AppleGothic, sans-serif"><span style="line-height:15.6000003814697px;"><a target="_blank" href="http://revh4ck.tistory.com/entry/%EB%A0%88%EC%9D%B4%EC%8A%A4-%EC%BB%A8%EB%94%94%EC%85%98%EC%97%90-%EB%8C%80%ED%95%B4-%EC%95%8C%EC%95%84%EB%B3%B4%EC%9E%90">http://revh4ck.tistory.com/entry/%EB%A0%88%EC%9D%B4%EC%8A%A4-%EC%BB%A8%EB%94%94%EC%85%98%EC%97%90-%EB%8C%80%ED%95%B4-%EC%95%8C%EC%95%84%EB%B3%B4%EC%9E%90</a> </span></font></span> <div><span style="background-color:#eeeeee;"><font face="돋움, Dotum, AppleGothic, sans-serif"><span style="line-height:15.6000003814697px;"><br></span></font></span></div> <div><span style="background-color:#eeeeee;"><font face="돋움, Dotum, AppleGothic, sans-serif"><span style="line-height:15.6000003814697px;"><br></span></font></span></div> <div><span style="background-color:#eeeeee;"><font face="돋움, Dotum, AppleGothic, sans-serif"><span style="line-height:15.6000003814697px;"><br>#include</span></font></span><br style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"><span style="font-family:'돋움', Dotum, AppleGothic, sans-serif;line-height:15.6000003814697px;background-color:#eeeeee;">#include</span><br style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"><br style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"><span style="font-family:'돋움', Dotum, AppleGothic, sans-serif;line-height:15.6000003814697px;background-color:#eeeeee;">int main(int argc, char **argv)</span><br style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"><span style="font-family:'돋움', Dotum, AppleGothic, sans-serif;line-height:15.6000003814697px;background-color:#eeeeee;">{</span><br style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"><span style="font-family:'돋움', Dotum, AppleGothic, sans-serif;line-height:15.6000003814697px;background-color:#eeeeee;"> int i=0, j=0;</span><br style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"><span style="font-family:'돋움', Dotum, AppleGothic, sans-serif;line-height:15.6000003814697px;background-color:#eeeeee;"> int ChildProcessId=0;</span><br style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"><br style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"><span style="font-family:'돋움', Dotum, AppleGothic, sans-serif;line-height:15.6000003814697px;background-color:#eeeeee;"> if((ChildProcessId = fork()) > 0) {</span><br style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"><span style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;width:1px;height:1px;float:right;"></span><span style="font-family:'돋움', Dotum, AppleGothic, sans-serif;line-height:15.6000003814697px;background-color:#eeeeee;"></span> <div style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"> for(i = 0; i < 10; i++)<br style="margin:0px;padding:0px;border:0px;line-height:1.3;"></div> <div style="margin:0px 0px 0px 8em;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;">printf('-');<br style="margin:0px;padding:0px;border:0px;line-height:1.3;"></div> <div style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"> exit(0);<br style="margin:0px;padding:0px;border:0px;line-height:1.3;"> }<br style="margin:0px;padding:0px;border:0px;line-height:1.3;"> else { <br style="margin:0px;padding:0px;border:0px;line-height:1.3;"> for(j = 0; j < 10; j++) printf('_');<br style="margin:0px;padding:0px;border:0px;line-height:1.3;"> exit(0);<br style="margin:0px;padding:0px;border:0px;line-height:1.3;"> }<br style="margin:0px;padding:0px;border:0px;line-height:1.3;"><br style="margin:0px;padding:0px;border:0px;line-height:1.3;"> system("PAUSE");</div> <div style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"> return 0;</div> <div style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;">}</div> <div style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"><br></div> <div style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"><br></div> <div style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;">라고 치면 이론상 -_-_-_-_-_-_-</div> <div style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;">이런식으로 나와야하는데</div> <div style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"> </div> <div style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;">___________----------- 이런식으로 나와버리는데요. </div> <div style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;">컴퓨터가 너무 빨라서인가요?</div> <div style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;"><br></div> <div style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;">(프로세스를 9000개까지도 늘려봤는데 저렇게 나옵니다. </div></div> <div style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;">정상적으로 -_-_- 로 나타내는 법은 어떻게 해야 될까요?</div> <div style="margin:0px;padding:0px;border:0px;line-height:15.6000003814697px;font-family:'돋움', Dotum, AppleGothic, sans-serif;">(세마포어같은 뮤텍스 동기화 방식처럼 vfork로도 동기화 가능한건가요?)</div>
댓글 분란 또는 분쟁 때문에 전체 댓글이 블라인드 처리되었습니다.