From: "Charles Sandmann" Newsgroups: comp.os.msdos.djgpp Subject: Re: Problems with sgtty.h, ioctl.h and termios.h Date: Wed, 14 Nov 2001 22:58:15 Organization: Aspen Technology, Inc. Lines: 26 Message-ID: <3bf2f707.sandmann@clio.rice.edu> References: <2950-Wed14Nov2001200434+0200-eliz AT is DOT elta DOT co DOT il> NNTP-Posting-Host: dcloan.hou.aspentech.com X-Trace: selma.aspentech.com 1005801121 5376 10.32.115.107 (15 Nov 2001 05:12:01 GMT) X-Complaints-To: postmaster AT aspentech DOT com NNTP-Posting-Date: 15 Nov 2001 05:12:01 GMT X-NewsEditor: ED-1.5.8 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > However, note that the fragment from the code posted here in the > beginning of the thread: > > if(ioctl(f3,TIOCEXCL)==0 && > ioctl(f4,TIOCEXCL)==0){ > lkterm.sg_ispeed = bdrate; > lkterm.sg_ospeed = bdrate; > lkterm.sg_erase = ERASECH; > lkterm.sg_kill = KILLCH; > lkterm.sg_flags = FLAG; > if(ioctl(f3,TIOCSETP,&lkterm)!=0 || > ioctl(f4,TIOCSETP,&lkterm)!=0){ > > does suggest that it's not a com port, but an input device such as a > terminal (otherwise, why set ERASECH and KILLCH?). Anything that sets baud rate is usually is bad news. The other sets may be due to terminal driver behavior (those chars are filtered and not sent in the protocol). If the code explicitly is referencing /dev/tty0 and setting baud rates ... If it was a terminal, the code would only work when you are logged into that one terminal on the system (why do that vs just /dev/tty?) But it's impossible to know for sure without seeing the entire code and knowing what it's used for.