* login/utmp_file.c (setutent_file): Minor optimization in case
O_CLOEXEC is available.
This commit is contained in:
parent
7b91359b2c
commit
7438a80dcb
@ -1,3 +1,8 @@
|
|||||||
|
2008-07-26 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* login/utmp_file.c (setutent_file): Minor optimization in case
|
||||||
|
O_CLOEXEC is available.
|
||||||
|
|
||||||
2008-07-24 Tom "spot" Callaway <tcallawa@redhat.com>
|
2008-07-24 Tom "spot" Callaway <tcallawa@redhat.com>
|
||||||
|
|
||||||
* Makeconfig: Define pie-ccflag and PIE-ccflag variables.
|
* Makeconfig: Define pie-ccflag and PIE-ccflag variables.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1996-2002, 2003, 2004, 2007 Free Software Foundation, Inc.
|
/* Copyright (C) 1996-2004, 2007, 2008 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>
|
Contributed by Ulrich Drepper <drepper@cygnus.com>
|
||||||
and Paul Janzen <pcj@primenet.com>, 1996.
|
and Paul Janzen <pcj@primenet.com>, 1996.
|
||||||
@ -167,10 +167,11 @@ setutent_file (void)
|
|||||||
# ifdef O_CLOEXEC
|
# ifdef O_CLOEXEC
|
||||||
if (__have_o_cloexec == 0)
|
if (__have_o_cloexec == 0)
|
||||||
__have_o_cloexec = (result & FD_CLOEXEC) ? 1 : -1;
|
__have_o_cloexec = (result & FD_CLOEXEC) ? 1 : -1;
|
||||||
# endif
|
|
||||||
|
|
||||||
result = fcntl_not_cancel (file_fd, F_SETFD,
|
if (__have_o_cloexec < 0)
|
||||||
result | FD_CLOEXEC);
|
# endif
|
||||||
|
result = fcntl_not_cancel (file_fd, F_SETFD,
|
||||||
|
result | FD_CLOEXEC);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == -1)
|
if (result == -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user