Re: [PATCH] core-count: A new program to count the number of cpu cores

2009-11-04 Thread Bruno Haible
There were no further comments except Pádraig's one, so I committed the change: 2009-11-04 Bruno Haible br...@clisp.org Make num_processors more flexible and consistent. * lib/nproc.h (enum nproc_query): New type. (num_processors): Add a 'query' argument. *

Re: incorrectly sorted file with snow leopard sort

2009-11-04 Thread Kamil Dudka
On Tuesday 03 of November 2009 23:41:29 emmanuel poirier wrote: And again the result is not good. - Andromeda is stuck to Alcatraz on the same line, and at the end I got skidrow stuck with virtual dreams It depends on what you wish to do with the \r. You can also replace it by either spaces or

Re: FTS not ready for a remount during traversal

2009-11-04 Thread Jim Meyering
Kamil Dudka wrote: On Sat October 31 2009 12:22:01 Jim Meyering wrote: I'm trying to reconcile this file system's behavior with fundamental assumptions about unchanging device/inode, and as a result am having second thoughts. What event causes the directory's stat.st_dev to change? Opening

Re: FTS not ready for a remount during traversal

2009-11-04 Thread Kamil Dudka
Hi Jim, On Wed November 4 2009 13:02:33 Jim Meyering wrote: I've built with it and compared before/after performance using an all-directories hierarchy on a tmpfs file system. The result is a 10% performance decrease in this contrived worst case: thanks for stating the upper boundary

Re: error while testing the installation of Coreutils-7.4 on my LFS-6.5-computer

2009-11-04 Thread Pádraig Brady
Marco Kluth wrote: Dear ladies and gentlemen, The installation of the Coreutils-7.4-softwarepackage is descriped on page 59 (= section 5.17.) of the book. By the command make RUN_EXPENSIVE_TESTS=yes check the Coreutils test suite will be executed. I did this tests and receive one error.

Re: several wording mistakes in FAQ

2009-11-04 Thread Benno Schulenberg
Hi Bob, On Sun, 01 Nov 2009 00:36 -0600, Bob Proulx b...@proulx.com wrote: Benno Schulenberg wrote: In item 14: wild-cards - wildcards, wild card - wildcard A spell checker error. Corrected. Still one present: you provided a wild card - wildcard In item 18: e.g. files with names -

Re: error while testing the installation of Coreutils-7.4 on my LFS-6.5-computer

2009-11-04 Thread Gilles Espinasse
Selon Marco Kluth mkl...@web.de: .. The installation of the Coreutils-7.4-softwarepackage is descriped on page 59 (= section 5.17.) of the book. By the command make RUN_EXPENSIVE_TESTS=yes check the Coreutils test suite will be executed. I did this tests and receive one error. There appeared

Re: FTS not ready for a remount during traversal

2009-11-04 Thread Jim Meyering
Kamil Dudka wrote: ... I saw similar numbers when timing rm -rf and chmod -R. Thus, I'm reluctant to impose such a penalty without first exhausting all other possibilities. Yes, it makes sense. However what other possibilities do we have actually? Change the kernel, or find a way to make fts

Re: [PATCH] core-count: A new program to count the number of cpu cores

2009-11-04 Thread Pádraig Brady
Paolo Bonzini wrote: On 11/04/2009 01:24 AM, Pádraig Brady wrote: BTW, it wouldn't be ambiguous to the program, nor would it be different than the existing meaning, but as you say, users could mistakenly do -P0 when they meant -0P. So I'll make the arg mandatory, but what to choose? n is all

Re: FTS not ready for a remount during traversal

2009-11-04 Thread Kamil Dudka
On Wednesday 04 of November 2009 16:12:42 Eric Blake wrote: We have already asked the kernel folks if they would be willing to make readdir () report accurate d_ino values for mount points, and they complained that it would be too expensive to guarantee correct d_ino information compared to

Re: temp file suffixes: mktemp DWIM

2009-11-04 Thread Eric Blake
Jim Meyering jim at meyering.net writes: mktemp a = error, no run of X mktemp aXX = error, run of X is too short mktemp XXX = generates 3-character name (if possible) mktemp aXXX.b = generates 6-character name (if possible) mktemp --suffix=.b aXXX = longer spelling of the above line

Re: make getdents/readdir POSIX compliant wrt mount-point dirent.d_ino

2009-11-04 Thread Jim Meyering
Ulrich Drepper wrote: On Tue, Sep 1, 2009 at 13:19, Theodore Tsoty...@mit.edu wrote: Furthermore, there are plenty of Unix systems that have received POSIX certifications despite having this behavior. A common misunderstanding of certification. Like for all certifications, being POSIX

Re: temp file suffixes: mktemp DWIM

2009-11-04 Thread Eric Blake
Eric Blake ebb9 at byu.net writes: This currently gives exit status 1, because the atexit() handler recognizes failure to print the file name to stdout, but leaves the temporary file around. Should we go ahead and manually flush/close stdout, rather than relying on close_stdout, so that

Re: temp file suffixes: mktemp DWIM

2009-11-04 Thread Eric Blake
Eric Blake ebb9 at byu.net writes: if (status == EXIT_SUCCESS) -puts (dest_name); +{ + puts (dest_name); + /* If we created a file, but then failed to output the file + name, we should clean up the mess before failing. */ + if (!dry_run close_stream

[PATCH] du now diagnoses cycles, rather than ignoring them

2009-11-04 Thread Jim Meyering
[fall-out from the FTS vs. automount-changing-st_dev problem, ...] While du ignoring cycles may not be an official bug (in the sense that the POSIX du spec says nothing about cycles) I think it deserves to be diagnosed and to provoke a nonzero exit status. You can reproduce the problem by

Re: [PATCH] du now diagnoses cycles, rather than ignoring them

2009-11-04 Thread Eric Blake
Jim Meyering jim at meyering.net writes: + if (symlink_deref_bits == FTS_PHYSICAL + || (symlink_deref_bits == (FTS_COMFOLLOW | FTS_PHYSICAL) + ent-fts_level != FTS_ROOTLEVEL)) Can't this be simplified? if (symlink_deref_bits == FTS_PHYSICAL ||

Re: [PATCH] du now diagnoses cycles, rather than ignoring them

2009-11-04 Thread Jim Meyering
Eric Blake wrote: Jim Meyering jim at meyering.net writes: + if (symlink_deref_bits == FTS_PHYSICAL + || (symlink_deref_bits == (FTS_COMFOLLOW | FTS_PHYSICAL) + ent-fts_level != FTS_ROOTLEVEL)) Can't this be simplified? if (symlink_deref_bits ==

Re: temp file suffixes: mktemp DWIM

2009-11-04 Thread Jim Meyering
Eric Blake wrote: Eric Blake ebb9 at byu.net writes: This currently gives exit status 1, because the atexit() handler recognizes failure to print the file name to stdout, but leaves the temporary file around. Should we go ahead and manually flush/close stdout, rather than relying on

Re: [PATCH] core-count: A new program to count the number of cpu cores

2009-11-04 Thread Giuseppe Scrivano
Bruno Haible br...@clisp.org writes: There were no further comments except Pádraig's one, so I committed the change: 2009-11-04 Bruno Haible br...@clisp.org Make num_processors more flexible and consistent. * lib/nproc.h (enum nproc_query): New type. (num_processors):

Re: temp file suffixes: mktemp DWIM

2009-11-04 Thread Pádraig Brady
Eric Blake wrote: + if (suffix) +{ + size_t len = strlen (template); + if (template[len - 1] != 'X') If you pass '' the above is invalid +{ + error (EXIT_FAILURE, 0, + _(with --suffix, template %s must end in X), + quote

Re: [PATCH] core-count: A new program to count the number of cpu cores

2009-11-04 Thread Paolo Bonzini
I have updated the new nproc program to use this change in gnulib. Thanks to Bruno, now nproc has not any logic inside but it is a mere wrapper around the gnulib module. I used as arguments to the new program the same names used by the `nproc_query' enum, except using --overridable instead of