Re: touch gets stuck for named pipes

2009-04-10 Thread Bruno Haible
Jim Meyering wrote: > > So, any objections to removing this module? > > Why don't we first mark it as obsolete? > I'll stop using it in coreutils right away, and we can > remove it altogether after a reasonable grace period. OK, I've committed the cross-compilation fix and done that: 2009-04-10

Re: touch gets stuck for named pipes

2009-04-09 Thread Jim Meyering
Bruno Haible wrote: > Paolo Bonzini wrote: >> I'll make it say "guessing yes" and still put "yes" in the variable. > > Thanks. Here is what the adaptation in gnulib could look like. But frankly, > I'll prefer to remove the module altogether: The bug it cures occurred only > on Sequents; the last ti

Re: touch gets stuck for named pipes

2009-04-09 Thread Paolo Bonzini
Bruno Haible wrote: > Paolo Bonzini wrote: >> I'll make it say "guessing yes" and still put "yes" in the variable. > > Thanks. Here is what the adaptation in gnulib could look like. But frankly, > I'll prefer to remove the module altogether: The bug it cures occurred only > on Sequents; the last t

Re: touch gets stuck for named pipes

2009-04-09 Thread Bruno Haible
Paolo Bonzini wrote: > I'll make it say "guessing yes" and still put "yes" in the variable. Thanks. Here is what the adaptation in gnulib could look like. But frankly, I'll prefer to remove the module altogether: The bug it cures occurred only on Sequents; the last time I heard about this kind of

Re: touch gets stuck for named pipes

2009-04-09 Thread Paolo Bonzini
>>> - ac_cv_func_utime_null=no)]) >>> + ac_cv_func_utime_null=yes)]) >> I'd write this as 'ac_cv_func_utime_null="guessing yes"', to make it obvious. > > It would be a tad more backwards-compatible to stick with "yes". > Consider a configure.ac that does this, > > AC_

Re: touch gets stuck for named pipes

2009-04-09 Thread Jim Meyering
Eric Blake wrote: > Paolo Bonzini gnu.org> writes: > >> > This macro is obsolescent, as all current systems have a `utime' >> > that behaves this way. New programs need not use this macro. >> >> I think that then _this_ is the cross-compilation default to be fixed. >> >> Ok? > > Fix the

Re: touch gets stuck for named pipes

2009-04-09 Thread Eric Blake
Paolo Bonzini gnu.org> writes: > > This macro is obsolescent, as all current systems have a `utime' > > that behaves this way. New programs need not use this macro. > > I think that then _this_ is the cross-compilation default to be fixed. > > Ok? Fix these nits before applying: >

Re: touch gets stuck for named pipes

2009-04-09 Thread Paolo Bonzini
> This is the main problem: autoconf guessed wrong. The AC_FUNC_UTIME_NULL macro > is already obsolete for 3 years: > > -- Macro: AC_FUNC_UTIME_NULL > If `utime (FILE, NULL)' sets FILE's timestamp to the present, > define `HAVE_UTIME_NULL'. > > This macro is obsolescent, as all c

Re: touch gets stuck for named pipes

2009-04-09 Thread Paul Eggert
Bruno Haible writes: > I propose to either > a) Change the cross-compiling default in m4/utime.m4 to > "ac_cv_func_utime_null=yes", or > b) Remove the 'utime' module altogether. Thanks for the analysis. Either solution would be OK, but surely (b) would be better, as nowadays the module

Re: touch gets stuck for named pipes

2009-04-09 Thread Bruno Haible
Pádraig Brady wrote: > So would this simplification be appropriate, which just handles systems > where utime("file", &ut); is OK while utime("file", NULL); is not? Often, when files are exported over NFS, the server and the client have different clocks. The write() call assigns to the file the cur

Re: touch gets stuck for named pipes

2009-04-09 Thread Pádraig Brady
Andreas Schwab wrote: > Pádraig Brady writes: > >> So would this simplification be appropriate, which just handles systems >> where utime("file", &ut); is OK while utime("file", NULL); is not? > > Note that utime(,0) requires less privileges than utime(,&ut). For the > latter you need to be own

Re: touch gets stuck for named pipes

2009-04-09 Thread Andreas Schwab
Pádraig Brady writes: > So would this simplification be appropriate, which just handles systems > where utime("file", &ut); is OK while utime("file", NULL); is not? Note that utime(,0) requires less privileges than utime(,&ut). For the latter you need to be owner, whereas the former only requir

Re: touch gets stuck for named pipes

2009-04-09 Thread Pádraig Brady
Jim Meyering wrote: > ipif wrote: >> I'm using coreutils-7.2 on an embedded sparc V8 with linux-2.6.21 and >> uclibc-0.9.30. >> The problem is, that in utime.c(73) it is tried to read a char from the file >> and to write it back. As the fifo is empty touch gets stuck waiting for >> input. >> Becaus