home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!mips!sdd.hp.com!caen!uvaarpa!murdoch!Turing.ORG!lfoard
- From: lfoard@Turing.ORG (Lawrence C. Foard)
- Newsgroups: comp.os.linux
- Subject: Re: Termios question: Semantics of VMIN/VTIME on Linux/SunOS ?
- Message-ID: <1992Jul22.213627.10041@murdoch.acc.Virginia.EDU>
- Date: 22 Jul 92 21:36:27 GMT
- References: <9207151400@gandalf.moria>
- Sender: usenet@murdoch.acc.Virginia.EDU
- Organization: The Turing Project, Charlottesville Virginia.
- Lines: 37
-
- In article <9207151400@gandalf.moria> u31b3hs@pool.informatik.rwth-aachen.de (Michael Haardt) writes:
- >I have an weird problem:
- >
- > struct termios buff;
- >
- > tcgetattr(file,&buff);
- > buff.c_lflag=0;
- > cfsetispeed(&buff,B1200);
- > buff.c_cc[VMIN]=5;
- > buff.c_cc[VTIME]=1;
- > tcsetattr(file,TCSANOW,&buff);
- >
- >I am no termios expert, but this code is intended to let a
- >
- > read(file,buffer,sizeof(buffer));
- >
- >read as much characters as available, max sizeof(buffer) and return
- >after a short timeout if there are none. Ok?
- >
- >Well, at least that is what Linux 0.96c.pl1 does -- in contrary to SunOS
- >4.1.1, which blocks until sizeof(buffer) characters are read.
- >
- >Who is right?
-
- I think Linux just ignores VMIN and VTIME, I had a problem with this
- porting code from Linux to sun OS. On linux I hadn't filled in those
- fields and got very weird behaviour on sun os :)
-
- On the otherhand Linux is almost perfectly compatible, the port of 1000
- lines took 15 minutes most spent on this. On the otherhand the code when
- moved back to linux ran perfectly the first time.
-
- --
- >>Unix/C Contract worker available 5 years C/unix work experience<< ______
- Available for Telecommuting/Travel and contracts on the T Line \ /
- in the Boston MA area. Send me e-mail for a copy of my Resume. \ /
- -- VWIS 508-793-9568 (2400 baud), Linux support BBS.-- \/
-