diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-11-24 18:50:32 -0800 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-11-24 18:50:32 -0800 |
commit | aa9890239a2aef81e64f3f22a31c7e01b6501f69 (patch) | |
tree | 9f11b2e9d90685e5c9b15a69e7ffefd259e4777e /ChangeLog | |
parent | 0f622686af3ae5a8f03dae886b08c260b38bda16 (diff) |
Optimize grantpt.
grantpt was performing two consecutive calls to stat with the same
file name. Avoid this by creating a special version of the ptsname
function which allows to pass the stat result back to the caller.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1,5 +1,15 @@ 2009-11-24 Ulrich Drepper <drepper@redhat.com> + * sysdeps/unix/grantpt.c (pts_name): Take additional parameter, + pass it on to __ptsname_internal. + (grantpt): Pass stat64 pointer to pts_name. Remove stat call here. + * sysdeps/unix/sysv/linux/ptsname.c (__ptsname_internal): New function. + All the code from __ptsname_r but take additional parameter. Use that + instead of pointer to local stat64 variable. + (__ptsname_r): Call __ptsname_internal with pointer to local stat64 + variable. + * include/stdlib.h: Declare __ptsname_internal. + * sysdeps/unix/grantpt.c (grantpt): Use CLOSE_ALL_FDS is available before the exec. * sysdeps/unix/sysv/linux/grantpt.c: New file. |