EAGAIN with libc_r

Пухальский Юрий Андреевич pooh at cryptopro.ru
Mon Aug 2 07:55:50 PDT 2004


Hello!

I try to read data from /dev/fd0 and use code like:

{
  char buf[512];
  int fd=open("/dev/fd0",O_RDONLY);
  printf("%d ",fd);
  perror("open");

  printf("%d ",read(fd,buf,512));
  perror("read");
}
When I compile it without threads, everything works ok. But when I try to do "gcc -pthread ...", or "gcc ... -lc_r" it hangs on read. When I call open() with O_NONBLOCK flag, I receive EAGAIN error on read(), whatever command I use to compile, -lc_r or not. Apparently it's some inner thing concerning floppy device?
Please, help to clear the issue!

Thank You in advance!


More information about the freebsd-threads mailing list