Re: [PATCH] openat: reduce syscalls in first probe of /proc

2011-05-09 Thread Eric Blake
On 05/09/2011 05:15 PM, Bruno Haible wrote: > Eric Blake wrote: >> - int proc_self_fd = open ("/proc/self/fd", O_SEARCH); >> + int proc_self_fd = open ("/proc/self/fd", >> + O_SEARCH | O_DIRECTORY | O_NOCTTY | >> O_NONBLOCK); > > What is the point of playin

Re: [PATCH] openat: reduce syscalls in first probe of /proc

2011-05-09 Thread Bruno Haible
Eric Blake wrote: > -      int proc_self_fd = open ("/proc/self/fd", O_SEARCH); > +      int proc_self_fd = open ("/proc/self/fd", > +                               O_SEARCH | O_DIRECTORY | O_NOCTTY | > O_NONBLOCK); What is the point of playing with O_NOCTTY and O_NONBLOCK here? It could trigger

Re: [PATCH] openat: reduce syscalls in first probe of /proc

2011-05-09 Thread Eric Blake
On 05/09/2011 04:37 PM, Eric Blake wrote: > open/access/close is cheaper than open/stat/stat/close. > > * lib/openat-proc.c (openat_proc_name): Simplify. > * modules/openat (Depends-on): Drop same-inode. > Reported by Bastien ROUCARIES. > > Signed-off-by: Eric Blake > --- > > I'm pushing this.

[PATCH] openat: reduce syscalls in first probe of /proc

2011-05-09 Thread Eric Blake
open/access/close is cheaper than open/stat/stat/close. * lib/openat-proc.c (openat_proc_name): Simplify. * modules/openat (Depends-on): Drop same-inode. Reported by Bastien ROUCARIES. Signed-off-by: Eric Blake --- I'm pushing this. ChangeLog |7 +++ lib/openat-proc.c | 13 +

Re: RE : Re: openat-proc

2011-05-09 Thread Eric Blake
On 05/09/2011 02:34 PM, Eric Blake wrote: > On 05/09/2011 01:10 PM, Eric Blake wrote: >> On 05/09/2011 12:06 PM, Bastien ROUCARIES wrote: >>> Sorry for top post (android) >>> >>> Proposed algo: >>> Ofd=open(/proc,o_search) >>> follow link /proc/self/fd/ofd/../proc >>> If bug will resolve to >>> /pr

Re: RE : Re: openat-proc

2011-05-09 Thread Eric Blake
On 05/09/2011 01:10 PM, Eric Blake wrote: > On 05/09/2011 12:06 PM, Bastien ROUCARIES wrote: >> Sorry for top post (android) >> >> Proposed algo: >> Ofd=open(/proc,o_search) >> follow link /proc/self/fd/ofd/../proc >> If bug will resolve to >> /proc/self/fd/proc that does not exist >> If not bug su

Re: Licensing of modules for libposix

2011-05-09 Thread Ralf Wildenhues
[ apologies if you receive this multiple times ] Hello, * Bruce Korb wrote on Wed, May 04, 2011 at 08:04:05PM CEST: > So, if I've not mis-stated nor missed anything, we only wait for Derek, > Paolo and Ralf. OK by me. Sorry for the delay, Ralf

Re: Licensing of modules for libposix

2011-05-09 Thread Ralf Wildenhues
[ apologies if you receive this multiple times ] * Reuben Thomas wrote on Wed, May 04, 2011 at 11:14:57AM CEST: > $ ls > */{acosl,asinl,atanl,cosl,expl,logl,sinl,sqrtl,tanl,isfinite,tmpfile,fflush,futimens,nanosleep,getgroups,tzset,strtoimax,strtoumax}.* > |xargs git log --pretty=format:%aN |sort

Re: RE : Re: openat-proc

2011-05-09 Thread Eric Blake
On 05/09/2011 12:06 PM, Bastien ROUCARIES wrote: > Sorry for top post (android) > > Proposed algo: > Ofd=open(/proc,o_search) > follow link /proc/self/fd/ofd/../proc > If bug will resolve to > /proc/self/fd/proc that does not exist > If not bug suceed (because we have already opened /proc I still

RE : Re: openat-proc

2011-05-09 Thread Bastien ROUCARIES
Sorry for top post (android) Proposed algo: Ofd=open(/proc,o_search) follow link /proc/self/fd/ofd/../proc If bug will resolve to /proc/self/fd/proc that does not exist If not bug suceed (because we have already opened /proc Bastien Le 9 mai 2011 19:37, "Eric Blake" a écrit : On 05/09/2011 05:

Re: openat-proc

2011-05-09 Thread Eric Blake
On 05/09/2011 05:49 AM, Bastien ROUCARIES wrote: > Hi, > > I am trying to modularize openat-proc, in order to create an openat using > passfd. I have created a test file for openat-proc, and I > think we could a little bit simplify the test of solaris bug, and drop a > dependency on same inode.

[PATCH] maint.mk: change semantics/name of tight_scope variables

2011-05-09 Thread Jim Meyering
Feedback welcome. In using this in iwhd, I decided to extend the variable-matching code, and the easiest way was to allow for /default_regexp/ || /custom_regexp/. Since each has a single (...) match, it "just works". I'm sure I could use some fancy new regexp capability that's only available in pe

Re: glob-libc.h not installed

2011-05-09 Thread Bruce Korb
On 05/08/11 15:24, Reuben Thomas wrote: Still missing a header: ... In file included from lposix.c:25:0: /usr/local/include/libposix/glob.h:381:23: fatal error: glob-libc.h: No such file or directory The derived file "glob.h" unconditionally sources "glob-libc.h". Therefore, whenever "glob.h"

Re: strcase?

2011-05-09 Thread Simon Josefsson
Eric Blake writes: > On 05/09/2011 06:54 AM, Bruno Haible wrote: >> Hi Simon, >> >>> I noticed the 'strcase' module is marked as obsolete. ... What >>> should be used instead? >> >> You are confusing "obsolete" with "deprecated". As explained in [1][2], the >> meaning of "obsolete" in gnulib i

Re: strcase?

2011-05-09 Thread Eric Blake
On 05/09/2011 06:54 AM, Bruno Haible wrote: > Hi Simon, > >> I noticed the 'strcase' module is marked as obsolete. ... What >> should be used instead? > > You are confusing "obsolete" with "deprecated". As explained in [1][2], the > meaning of "obsolete" in gnulib is that you don't need it, *not

Re: strcase?

2011-05-09 Thread Bruno Haible
Hi Simon, > I noticed the 'strcase' module is marked as obsolete. ... What > should be used instead? You are confusing "obsolete" with "deprecated". As explained in [1][2], the meaning of "obsolete" in gnulib is that you don't need it, *not* that it will go away. [1] http://www.gnu.org/software

openat-proc

2011-05-09 Thread Bastien ROUCARIES
Hi, I am trying to modularize openat-proc, in order to create an openat using passfd. I have created a test file for openat-proc, and I think we could a little bit simplify the test of solaris bug, and drop a dependency on same inode. Instead of comparing /proc/self inode why not trying to ope

strcase?

2011-05-09 Thread Simon Josefsson
I noticed the 'strcase' module is marked as obsolete. I don't see anything in NEWS about that, doc/posix-functions/strcasecmp still refers to 'strcase', and the 'strcase' module is used by some other modules (argp, strptime). Is the module really meant to be obsolete? What should be used instead

[PATCH] maint.mk: add a syntax-check rule to ensure tightly-scoped symbols

2011-05-09 Thread Jim Meyering
I've been using a precursor of this rule in coreutils for many years, added it to idutils a year or two ago and added it to grep just recently. I did not like having to duplicate and customize bits in the separate copies, depending on where I used it, so finally have made it general enough so that

bootstrap symlink dependencies

2011-05-09 Thread Pádraig Brady
I've noticed a few times when re-running bootstrap within my coreutils directory, that the build will fail because it seems that the timestamps of the symlinks in m4/ are used, rather than those of the target m4 files. For example recently, @HAVE_SIGHANDLER_T@ was left unsubstituted in lib/signal.

Re: gl_PREREQ_GC

2011-05-09 Thread Simon Josefsson
Bruno Haible writes: > Hi Simon, > > The macro gl_PREREQ_GC in m4/gc.m4 is nowhere invoked in gnulib and also not > needed, because none of the files lib/gc.h, lib/gc-libgcrypt.c, > lib/gc-gnulib.c > uses the 'restrict' keyword. > > I guess this macro could just be removed? Hi Bruno. Yes. It