[Gluster-devel] NetBSD issue: failed to create logfile "/dev/stderr"
    Emmanuel Dreyfus 
    manu at netbsd.org
       
    Mon Feb  6 15:45:12 UTC 2017
    
    
  
On Mon, Feb 06, 2017 at 07:54:45AM -0500, Jeff Darcy wrote:
> >     ERROR: failed to create logfile "/dev/stderr" (Permission denied)
If I understand correcly, you feed gf_log_init() with /dev/stderr
ot /dev/tty. is that right?
The function uses:
        fd = open (file, O_CREAT | O_RDONLY, S_IRUSR | S_IWUSR);
        if (fd < 0) {   
                fprintf (stderr, "ERROR: failed to create logfile"      
                         " \"%s\" (%s)\n", file, strerror (errno));
                return -1;                              
        } 
I see no reason why it should fail. I just ran a test on nbslave74
and it passed (see below). Could you run ktrace -di your_test
so that se see in the kernel trace how it fails?
#include <fcntl.h>
#include <err.h>
int
main(void)
{
        int fd;
        char file[] = "/dev/stderr";
        
        fd = open (file, O_CREAT | O_RDONLY, S_IRUSR | S_IWUSR);
        if (fd == -1)
                err(1, "open faield");
        return 0;
}
-- 
Emmanuel Dreyfus
manu at netbsd.org
    
    
More information about the Gluster-devel
mailing list