On Nov 8, 2013 5:20 PM, "Serge Hallyn" <serge.hal...@ubuntu.com> wrote:
>
> Quoting S.Çağlar Onur (cag...@10ur.org):
> > Hey Serge,
> >
> > On Fri, Nov 8, 2013 at 4:06 PM, Serge Hallyn <serge.hal...@ubuntu.com>
wrote:
> > > Quoting S.Çağlar Onur (cag...@10ur.org):
> > >> creat() is equivalent to open() with flags equal to
O_CREAT|O_WRONLY|O_TRUNC
> > >
> > > Hi,
> > >
> > > I'm confused - what is redundant in the use of creat()? If there is
an
> > > improvement here then I don't understand what it is. Otherwise I'd
> > > argue creat() is more concise and clearer about its intent.
> >
> > There is no improvement other than a syntactic change (assuming
> > creat() is also protected by glibc like open()). I saw them while
> > trying to come up with a list of functions protected by process_lock
> > and replaced them with open() without checking what glibc does. If you
> > think creat is also protected than please feel free to drop this :)
>
> int
> __libc_creat (file, mode)
> const char *file;
> mode_t mode;
> {
> return __open (file, O_WRONLY|O_CREAT|O_TRUNC, mode);
> }
Eheh see, redundant as well as missing a letter :P
> :)
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel