Re: Bug: tests/fsync.c: don't check for fsync failure on invalid fd

2013-03-13 Thread Paul Eggert
On 03/13/2013 07:11 PM, Phillip Susi wrote: > If anyone is going to use it then it may be worth the bother. MIT Kerberos relies on fsync (invalid_fd) returning -1, so I suppose it's worth the bother. Here's a proposed patch, to libeatmydata. I haven't tested it. === modified file 'libeatmydata/l

Re: test-fclose coredumps on AIX 5 thru 7 (and similar test-strtod coredump on ia64)

2013-03-13 Thread Gary V. Vaughan
Hi Paul, On 11 Mar 2013, at 21:55, Paul Eggert wrote: > On 03/11/2013 12:35 AM, Gary V. Vaughan wrote: >> Anything I can do to help debug this failure? > > That looks like an AIX bug, no? Perhaps file a bug with IBM? > > I'm not sure it's gnulib's job to work around that bug I'm not yet c

Re: Bug: tests/fsync.c: don't check for fsync failure on invalid fd

2013-03-13 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/13/2013 10:01 PM, Eric Blake wrote: > On 03/13/2013 06:59 PM, Phillip Susi wrote: >> At worst, gnulib should set a flag that applications can check >> for if they really depend on this behavior, so that those that >> don't ( everyone? ) won't fai

Re: Bug: tests/fsync.c: don't check for fsync failure on invalid fd

2013-03-13 Thread Eric Blake
On 03/13/2013 06:59 PM, Phillip Susi wrote: > At worst, gnulib should set a flag that applications can check for if > they really depend on this behavior, so that those that don't ( > everyone? ) won't fail to build. Propose a patch then. -- Eric Blake eblake redhat com+1-919-301-3266 Libv

Re: Bug: tests/fsync.c: don't check for fsync failure on invalid fd

2013-03-13 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/13/2013 06:55 PM, Paul Eggert wrote: > No, it's not similar. POSIX says that a double free has undefined > behavior so an implementation can do what it likes. In contrast, > POSIX says that fsync (-1) must return -1 and set errno; an > implement

Re: Bug: tests/fsync.c: don't check for fsync failure on invalid fd

2013-03-13 Thread Paul Eggert
On 03/13/13 14:04, Phillip Susi wrote: > In a similar manner, it is *nice* that the debug libc's malloc can > detect a double free No, it's not similar. POSIX says that a double free has undefined behavior so an implementation can do what it likes. In contrast, POSIX says that fsync (-1) must re

Re: Bug: tests/fsync.c: don't check for fsync failure on invalid fd

2013-03-13 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/13/2013 12:03 PM, Eric Blake wrote: > Libvirt depends on fsync(), as provided by gnulib, returning EBADF > on invalid fds. It logs fsync() failures, and such logs have > proven invaluable in detecting double-close bugs, in order to > eradicate th

Re: Bug: tests/fsync.c: don't check for fsync failure on invalid fd

2013-03-13 Thread Eric Blake
On 03/13/2013 09:56 AM, Phillip Susi wrote: > On 3/13/2013 11:30 AM, Paul Eggert wrote: >> Gnulib is an application that easily found out that the library >> violates POSIX, which indicates that the library's main point is >> not properly supported. There should be an easy fix, no? > > Gnulib isn

Re: Bug: tests/fsync.c: don't check for fsync failure on invalid fd

2013-03-13 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/13/2013 11:30 AM, Paul Eggert wrote: > Gnulib is an application that easily found out that the library > violates POSIX, which indicates that the library's main point is > not properly supported. There should be an easy fix, no? Gnulib isn't an

Re: Bug: tests/fsync.c: don't check for fsync failure on invalid fd

2013-03-13 Thread Paul Eggert
On 03/13/2013 07:31 AM, Phillip Susi wrote: > The > whole point of the library is to violate posix, without letting > applications know. Gnulib is an application that easily found out that the library violates POSIX, which indicates that the library's main point is not properly supported. There s

Re: Bug: tests/fsync.c: don't check for fsync failure on invalid fd

2013-03-13 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/13/2013 10:02 AM, Eric Blake wrote: > There may be no syncing action, but it is still reasonable to > ensure that the fd is still valid enough to be sync'd. It's a > single fcntl() call to prove whether an fd is valid. Yes, but why? Why does gn

Re: Bug: tests/fsync.c: don't check for fsync failure on invalid fd

2013-03-13 Thread Eric Blake
On 03/13/2013 07:55 AM, Phillip Susi wrote: > Please use your mail agent's reply-to-all function on public mailing > lists. I did not see this until now because I am not subscribed, and > then I had to download and import the archive to reply properly. I did, both in my original reply, and again

Re: Bug: tests/fsync.c: don't check for fsync failure on invalid fd

2013-03-13 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Please use your mail agent's reply-to-all function on public mailing lists. I did not see this until now because I am not subscribed, and then I had to download and import the archive to reply properly. On 2/15/2013 3:59 PM, Eric Blake wrote: > On 02

[PATCH] putenv: port to Solaris 10

2013-03-13 Thread Paul Eggert
* lib/putenv.c (_unsetenv, putenv): Use HAVE_DECL__PUTENV, not HAVE__PUTENV. Solaris 10 has a _putenv that's not declared and is not what is wanted here. * m4/putenv.m4 (gl_PREREQ_PUTENV): Check for _putenv's declaration, not for its existence. --- ChangeLog| 9 + lib/putenv.c | 10 +