From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,6fea83d0221c3b10 X-Google-Attributes: gid1164f8,public X-Google-Thread: 10b612,6fea83d0221c3b10 X-Google-Attributes: gid10b612,public X-Google-ArrivalTime: 1992-07-17 10:59:56 PST Xref: sparky comp.sys.dec:4080 comp.unix.ultrix:5753 Newsgroups: comp.sys.dec,comp.unix.ultrix Path: sparky!uunet!darwin.sura.net!mips!decwrl!deccrl!news.crl.dec.com!news!nntpd.lkg.dec.com!lkg.dec.com!thomas From: thomas@lkg.dec.com (Matt Thomas) Subject: Re: ioctl(TIOC[CS]BRK) woes (was Re: Halting a DECstation via BREAK) Message-ID: <1992Jul17.224252.17475@nntpd.lkg.dec.com> Sender: thomas@mipsbx.lkg.dec.com (Matt Thomas) Reply-To: thomas@lkg.dec.com Organization: Digital Equipment Corporation References: <1992Jul17.164906.7087@news.iastate.edu> <1992Jul17.194211.16289@news.iastate.edu> Date: Fri, 17 Jul 1992 22:42:52 GMT 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.