pkgsrc-Bugs archive

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

Re: pkg/43904: pbulk's read_child.c compilation fails with GCC 4.4.3 under Ubuntu GNU/Linux



The following reply was made to PR pkg/43904; it has been noted by GNATS.

From: David Holland <dholland-pbugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/43904: pbulk's read_child.c compilation fails with GCC
 4.4.3 under Ubuntu GNU/Linux
Date: Mon, 27 Sep 2010 00:42:35 +0000

 On Fri, Sep 24, 2010 at 09:05:03PM +0000, Joerg Sonnenberger wrote:
  >> This is related to more strict checks newer versions of gcc do...
  >  
  >  Frankly, this "stricter checks" are just bullshit and I would strongly
  >  prefer to see a upstream PR for GCC first.
 
 On the other hand, the logic in the code is unnecessarily complicated,
 and as it is it ought to be saving errno across those system calls.
 
 What about e.g.
 
 --- files/pbulk/lib/read_child.c       25 Jun 2007 21:38:44 -0000      1.2
 +++ files/pbulk/lib/read_child.c       27 Sep 2010 00:40:57 -0000
 @@ -66,11 +66,11 @@ read_from_child(const char *dir, const c
                buf = xrealloc(buf, buf_len + 1);
        }
        if (bytes_read == -1) {
 -              error = "read failed";
 +              warn("read failed");
                (void)close(fd);
                (void)kill(child, SIGTERM);
                (void)waitpid(child, &status, 0);
 -              err(1, error);
 +              exit(1);
        }
  
        (void)close(fd);
 
 ?
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index