fix mkostemp, add pipe2-safer

2009-12-05 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm currently testing the following series. Any thoughts or review on this? Eric Blake (5): cloexec: add dup_cloexec Rather than having dup_noinherit, specific to w32spawn.h, it seems better to have a version also ported to Unix. Eventually, w

Re: [PATCH] progname: don't segfault when argv is NULL

2009-12-05 Thread Bruno Haible
Eric Blake wrote: > is the string worth marking as > translatable? Or should it try error() rather than fputs()? Since 'progname' is used by virtually every program that uses gnulib, I wish to minimize its dependencies. Regarding the translation: An error message that is seen by a user on averag

Re: [PATCH] progname: don't segfault when argv is NULL

2009-12-05 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 12/5/2009 6:08 AM: > Ad 2): > This is indeed a kernel problem: OpenBSD 4.0 returns with error code > EFAULT if you pass NULL to execve or execv or execvp. Linux 2.6.25.20 > does not. Here's the draft for a report to a linux

Re: The make-check phase in 8.1 fails to BUILD test-xalloc-die on MacOSX.

2009-12-05 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to SciFi on 12/5/2009 11:18 AM: > gcc-4.2 -std=gnu99 -fast -mtune=core2 -march=core2 > -force_cpusubtype_ALL -arch i386 -fast -mtune=core2 -march=core2 > -force_cpusubtype_ALL -arch i386 -o test-xalloc-die test-xalloc-die.o

Re: announce-gen -- not flexible enough

2009-12-05 Thread Alfred M. Szmidt
I.e., initialize "require_news=true" or to false, then run the "command": if $require_news; then ... fi By reversing the sense of the name, you make it so the three added tests are not all negated. That's more readable. Good idea; but there is a better way to

Re: announce-gen -- not flexible enough

2009-12-05 Thread Ralf Wildenhues
* Alfred M. Szmidt wrote on Sat, Dec 05, 2009 at 06:26:23PM CET: > +if [ $opt_skip_news == "false" ]; then FWIW, test aka [ with `==' is a bashism, please use `=' instead. Cheers, Ralf

Re: announce-gen -- not flexible enough

2009-12-05 Thread Jim Meyering
Alfred M. Szmidt wrote: >You said you would not be changing announce-gen, so isn't it moot? > > I said that I did not have enough knowledge to hack announce-gen since > it is written in perl; I cannot do something when I don't know how to > do it. > >I pointed out that yet another script pa

Re: announce-gen -- not flexible enough

2009-12-05 Thread Alfred M. Szmidt
You said you would not be changing announce-gen, so isn't it moot? I said that I did not have enough knowledge to hack announce-gen since it is written in perl; I cannot do something when I don't know how to do it. I pointed out that yet another script parses (and rewrites) NEWS and woul

Re: announce-gen -- not flexible enough

2009-12-05 Thread Jim Meyering
Alfred M. Szmidt wrote: >Alfred M. Szmidt wrote: >> announce-gen is lovley, but it is very inflexible if you use a >> different format for NEWS. >> >> In inetutils, we use something like: >> >> | December 27, 2008 >> | Version 1.6: >> | >> | * Fixed FOO in B

Re: announce-gen -- not flexible enough

2009-12-05 Thread Alfred M. Szmidt
Alfred M. Szmidt wrote: > announce-gen is lovley, but it is very inflexible if you use a > different format for NEWS. > > In inetutils, we use something like: > > | December 27, 2008 > | Version 1.6: > | > | * Fixed FOO in BAR. > | > | * Added BAZ. > | >

Re: announce-gen -- not flexible enough

2009-12-05 Thread Jim Meyering
Alfred M. Szmidt wrote: > announce-gen is lovley, but it is very inflexible if you use a > different format for NEWS. > > In inetutils, we use something like: > > | December 27, 2008 > | Version 1.6: > | > | * Fixed FOO in BAR. > | > | * Added BAZ. > | > | October 21, 2006 > | Version 1.5: > | >

Re: [PATCH] progname: don't segfault when argv is NULL

2009-12-05 Thread Bruno Haible
Hi Jim, > Just 3 days ago I received a private report of sleep segfaulting. > Unfortunately, it was not reproducible. If a user gets a segfault, there is a bug somewhere. Question #1 is: Where is the bug? You already answered that: it's in the parent process. Question #2 is: Where should the b

announce-gen -- not flexible enough

2009-12-05 Thread Alfred M. Szmidt
announce-gen is lovley, but it is very inflexible if you use a different format for NEWS. In inetutils, we use something like: | December 27, 2008 | Version 1.6: | | * Fixed FOO in BAR. | | * Added BAZ. | | October 21, 2006 | Version 1.5: | | ... I am not sure what a way one should fix announ

Re: news-date-check tweaking..

2009-12-05 Thread Alfred M. Szmidt
If you don't mind, sending git format-patch output (i.e with a log entry) and removing the space-before-TAB ^^ would be nice. Will try to do so in the future.

Re: [PATCH] maint.mk: news-check: use grep -E

2009-12-05 Thread Alfred M. Szmidt
Lovley Jim and Eric, thanks!

[PATCH] maint.mk: backslash-escape parens in default regexp

2009-12-05 Thread Jim Meyering
Just pushed: >From 208edc200d8bd7f9ce63cd348445b21fdbf58984 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 5 Dec 2009 10:02:01 +0100 Subject: [PATCH] maint.mk: backslash-escape parens in default regexp * top/maint.mk (news-check-regexp): Now that we're using grep -E, backslash-escape the

[PATCH] maint.mk: news-check: use grep -E

2009-12-05 Thread Jim Meyering
I realized that I really didn't want to encourage using grep (as opposed to grep -E) regular expressions in any customized news check. Then I realized that news-date-check wasn't really accurate, since the default is also to check the version number. So I renamed the new variable to be more gener

Re: [PATCH] progname: don't segfault when argv is NULL

2009-12-05 Thread Jim Meyering
Bruno Haible wrote: >> Ok to apply the patch below? >> Without it, anyone can make nearly any coreutils program segfault >> with this simple recipe: >> >> printf '%s\n' '#include ' 'int main(int c, char**v)' \ >> '{ execve (v[1], 0, 0); }' > k.c && gcc k.c && ./a.out /bin/cat >> >> While th