<div dir="rtl"><div dir="ltr"><a href="https://reviews.llvm.org/D31505">https://reviews.llvm.org/D31505</a><br></div></div><br><div class="gmail_quote"><div dir="rtl">‫בתאריך יום ה׳, 30 במרץ 2017 ב-21:58 מאת ‪Joerg Sonnenberger via llvm-commits‬‏ <‪<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>‬‏>:‬<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Mar 30, 2017 at 01:44:25PM -0400, Rafael Espíndola via llvm-commits wrote:<br class="gmail_msg">
> On 30 March 2017 at 13:38, Yaron Keren <<a href="mailto:yaron.keren@gmail.com" class="gmail_msg" target="_blank">yaron.keren@gmail.com</a>> wrote:<br class="gmail_msg">
> > stdout is special since getFD (pre-commit) always returns the same file<br class="gmail_msg">
> > descriptor, STDOUT_FILENO (1) whereas for regular files openFileForWrite<br class="gmail_msg">
> > will return new (unique) file descriptor and then there is no problem of<br class="gmail_msg">
> > closing one of them.<br class="gmail_msg">
><br class="gmail_msg">
> With the current code we also get an unique file descriptor for each<br class="gmail_msg">
> call to get a stream to stdout.<br class="gmail_msg">
<br class="gmail_msg">
Actually, no. You get a reference to the same kernel file. Many/most of the<br class="gmail_msg">
properties of the file handle will persist and/or be shared. This is<br class="gmail_msg">
different from (re)opening the same regular file multiple times.<br class="gmail_msg">
<br class="gmail_msg">
Joerg<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
llvm-commits mailing list<br class="gmail_msg">
<a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="gmail_msg">
</blockquote></div>