Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: thomas@lkg.dec.com (Matt Thomas)
Subject: Re: ioctl(TIOC[CS]BRK) woes (was Re: Halting a DECstation via BREAK)
Date: Fri, 17 Jul 1992 22:42:52 GMT	[thread overview]
Message-ID: <1992Jul17.224252.17475@nntpd.lkg.dec.com> (raw)
In-Reply-To: 1992Jul17.194211.16289@news.iastate.edu


In article <1992Jul17.194211.16289@news.iastate.edu>, john@iastate.edu (John Hascall) writes:
|>Why does the ioctl(TIOCSBRK) work (apparently), but the ioctl(TIOCCBRK)
|>gets errno 25 (ENOTTY, "Not a typewriter")???
|>
|>    errno = 0;                                         /* just in case */
|>    if (-1 == ioctl(fdtty, TIOCSBRK, (char *)0)) {
|>            /* ... bitch about errno and exit ... */
|>    }
|>    sleep(3);
|>    errno = 0;                                         /* just in case */
|>    if (-1 == ioctl(fdtty, TIOCCBRK, (char *)0)) {
|>            /* ... bitch about errno and exit ... */
|>    }
|>
|>If it makes a difference, fdtty is a LAT tty `connected' with lcp -h.

It does.  LAT only can "send" a break, it can't clear a break.  When it
gets a TIOCSBRK, it send a DATA_B slot to the terminal with the BREAK
bit set.  TIOCCBRK has no meaning and the original author didn't check 
for it.  I guess that we could modify LAT to silently eat the TIOCCBRK.

Too bad abou the timing though.  It's probably too late to get into ULTRIX
V4.3 (but I'll try) but it can be incorporated into the next release of
DEC OSF/1.
--
Matt Thomas                     Internet:   thomas@lkg.dec.com
DECnet-ULTRIX Development       UUCP:       ...!decwrl!thomas
Digital Equipment Corporation   Disclaimer: This message reflects my own
Littleton, MA                               warped views, etc.


      reply	other threads:[~1992-07-17 22:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-07-17 16:49 Halting a DECstation via BREAK John Hascall
1992-07-17 14:07 ` Paul A Vixie
1992-07-17 18:49   ` Dave Rasmussen
1992-07-17 21:38     ` J. Dean Brock
1992-07-22 23:21       ` AJ Casamento
1992-07-17 19:42   ` ioctl(TIOC[CS]BRK) woes (was Re: Halting a DECstation via BREAK) John Hascall
1992-07-17 22:42     ` Matt Thomas [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox