From: bsl04@... (Brian) Date: 2002-11-11T07:04:59+09:00 Subject: Re: ioctl to detect CTS > but it results in errors. > irb(main):006:0> f.ioctl(0x5415) > Errno::EFAULT: Bad address - "/dev/modem" > from (irb):6:in `ioctl' > from (irb):6 Basically, it seems to be caused by bugs in the ~2002.11.10 snapshot. Code in io.c seems to think that ioctl returns its goodies in the return value, but that doesn't really seem to be the way at works, at least in Linux and OpenBSD. The third argument of ioctl is a pointer to an integer, and the goodies come back in that, not in the return value. So I sort of fixed the bug and got stuff to work and told Nobu and hopefully people who actually know what they're doing will make actual good fixes at some point in the near future.