From: Makhno Date: 2001-04-07T03:10:04+09:00 Subject: [ruby-talk:13540] Reading a Serial port portably I'm trying to write some portable ruby code (linux/solaris/NT) to read a serial port. The device on the other end sends completely arbitary data of arbitary lengths. I can use select() to know when data is available, but have no idea on how much to read. As far as I can tell, I can either keep doing sysreads of length 1 then calling select again (something I'd rather not do) or use the iocntl (which might cause me headaches on NT). Does anyone have any ideas on the way to proceed with this problem? Thx