[llvm] r297661 - Bring back r297624.

Yaron Keren via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 12:27:46 PDT 2017


https://reviews.llvm.org/D31505

‫בתאריך יום ה׳, 30 במרץ 2017 ב-21:58 מאת ‪Joerg Sonnenberger via
llvm-commits‬‏ <‪llvm-commits at lists.llvm.org‬‏>:‬

> On Thu, Mar 30, 2017 at 01:44:25PM -0400, Rafael Espíndola via
> llvm-commits wrote:
> > On 30 March 2017 at 13:38, Yaron Keren <yaron.keren at gmail.com> wrote:
> > > stdout is special since getFD (pre-commit) always returns the same file
> > > descriptor, STDOUT_FILENO (1) whereas for regular files
> openFileForWrite
> > > will return new (unique) file descriptor and then there is no problem
> of
> > > closing one of them.
> >
> > With the current code we also get an unique file descriptor for each
> > call to get a stream to stdout.
>
> Actually, no. You get a reference to the same kernel file. Many/most of the
> properties of the file handle will persist and/or be shared. This is
> different from (re)opening the same regular file multiple times.
>
> Joerg
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170330/903bf488/attachment.html>


More information about the llvm-commits mailing list