Date: Sat, 29 Jul 2000 09:47:14 +0200 From: Mark Murray <mark@grondar.za> To: Hiroyuki Hanai <hanai@imgsrc.co.jp> Cc: current@FreeBSD.org, markm@FreeBSD.org Subject: Re: fcntl and /dev/random Message-ID: <200007290747.JAA03041@grimreaper.grondar.za> In-Reply-To: <8266pp602g.wl@darkmatter.imgsrc.co.jp> ; from Hiroyuki Hanai <hanai@imgsrc.co.jp> "Sat, 29 Jul 2000 13:18:47 %2B0900." References: <8266pp602g.wl@darkmatter.imgsrc.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi I'm looking at this; I'll have something by the end of the weekend for 5-CURRENT; 4-STABLE will take a bit longer. I don't think I'll dop anything for 3-* as it is at its end-of-life. Domo Arrigato! M > > Setting status flags using F_SETFL command of fcntl(2) on the file > descriptor, which is returned by open(2)ing /dev/random, seems not to > be supported. For example, when I run following code; > > #include <stdio.h> > #include <errno.h> > #include <fcntl.h> > main() > { > int fd; > fd = open("/dev/random", O_RDONLY); > if (fcntl(fd, F_SETFL, O_NONBLOCK) == -1) { > printf("%s\n", strerror(errno)); > } > } > > 3.4-RELEASE(and possibly 3.5 and 3.5.1) and 4.1-RELEASE/4.1-STABLE say > `Inappropriate ioctl for device' and 5-current says `Operation not > supported by device'. > > I've found above in BIND9's source and its `named' program complains > everytime it's invoked. > > Should I fix BIND9's code? or wait for fcntl's F_SETFL being > supported on FreeBSD? > > Actually, in BIND9, fd is already open(2)ed with `O_RDONLY | O_NONBLOCK' > and setting O_NONBLOCK status with fcntl(2) is not needed, which means > that fixing BIND9's code is very simple; just comment out the fcntl(2)ing lin e. > > h.hanai > -- Mark Murray Join the anti-SPAM movement: http://www.cauce.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007290747.JAA03041>