<div dir="ltr">In Man page, <div><img src="cid:ii_14861237db15fa73" alt="Inline image 1" width="562" height="40"><br></div><div><img src="cid:ii_1486123efda63746" alt="Inline image 2" width="562" height="44"><br></div><div><br></div><div>You can use both if you simply want to terminate program. However, only exit(int status) will give feed back to the parent parent process.</div><div>See fork() or google pthread if you are interest in it. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 10, 2014 at 3:32 PM, Sadia Akhter <span dir="ltr">&lt;<a href="mailto:sakhter@stevens.edu" target="_blank">sakhter@stevens.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
In my previous experience with C, I have always used &quot;return 0;&quot; to return from main() function. Those were of course not any system programming codes. However, in the text book APUE, I noticed that they always use &quot;exit(0)&quot; in main(). Can anyone tell me why is that? Is there any significant difference between these two? Or is it just regular practice?<br>
<br>
Thanks,<br>
Sadia Akhter<br>
_______________________________________________<br>
cs631apue mailing list<br>
<a href="mailto:cs631apue@lists.stevens.edu">cs631apue@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs631apue" target="_blank">https://lists.stevens.edu/mailman/listinfo/cs631apue</a><br>
</blockquote></div><br></div>