Re: NetBSD issue: failed to create logfile "/dev/stderr"

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

 



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@xxxxxxxxxx
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://lists.gluster.org/mailman/listinfo/gluster-devel



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux