bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Buildreport for GnuTLS 2.8.3


From: Bruno Haible
Subject: Re: Buildreport for GnuTLS 2.8.3
Date: Mon, 17 Aug 2009 23:22:58 +0200
User-agent: KMail/1.9.9

Eric Blake wrote:
> If others agree that adding this crutch is worthwhile

Yes, I'm in favour of this new module. 'siginterrupt' was already
considered obsolete in 1993 or so, as I remember from discussions with
H.J. Lu at that time. But Simon's module is so clear, small, self-contained,
that I see no problem in adding it.

> then I would suggest using the example straight out of POSIX:
> http://www.opengroup.org/onlinepubs/9699919799/functions/siginterrupt.html
> 
> +int
> +siginterrupt (int sig, int flag)
> +{
> +  struct sigaction act;
> +
> +  if (sigaction (sig, NULL, &act) < 0)
> +    return -1;
> 
> POSIX ignores sigaction failure here, rather than returning -1.

That's an instance of bad coding practice. There are others like this in
the POSIX standard. Some OS vendor implemented the posix_spawn() function
by copy&pasting the code from POSIX - and the result is a number of bugs
that make the implementation unusable, so that gnulib rightfully replaces it.

Simon's patch looks entirely fine to me, except that he should use an
ASCII tilde in this line:
  act.sa_flags &= ˜SA_RESTART;
(Maybe this is an artefact of his mailer.)

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]