[kaffe] SecureRandomTest failed

Ito Kazumitsu kaz at maczuka.gcd.org
Sun Jul 24 19:39:25 PDT 2005


From: Ito Kazumitsu <kaz at maczuka.gcd.org>
Subject: Re: [kaffe] SecureRandomTest failed
Date: Sun, 24 Jul 2005 08:18:31 +0900 (JST)

> java.io.IOException: Inappropriate ioctl for device

I am afraid that on FreeBSD, ioctl with FIONREAD cannot
be used for file IO.

The following simple program shows errno == 25 (Inappropriate ioctl
for device).

#include <sys/ioctl.h>
#include <sys/filio.h>
#include <errno.h>
#include <fcntl.h>

int main(int argc, char* argv) {

int n;
int fd;

fd = open("test.c", O_RDONLY);
int rc = ioctl(fd,FIONREAD,&n);
printf("%d, %d\n", rc, errno);

}



More information about the kaffe mailing list