From: bsl04@... (Brian) Date: 2002-11-15T03:00:36+09:00 Subject: Re: ioctl to detect CTS nobu.nokada@softhome.net wrote in message news:<200211120146.gAC1kJq05740@sharui.nakada.kanuma.tochigi.jp>... > Hi, > > At Sat, 9 Nov 2002 14:17:08 +0900, > Brian wrote: > > .... > > ioctl(fd, TIOCMGET, &s); > > if ((s & TIOCM_CTS) == TIOCM_CTS) { > > .... > > > > I tried to reimplement this in ruby with stuff like > > > > f = File.open '/dev/modem' > > p f.ioctl(0x5415) > > f.ioctl(0x5415, s = "") > p s.unpack("i")[0] Doh. I didn't see that the number of arguments to ioctl changed after 1.6.7 somewhere. Thanks.