Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!ptsfa!ihnp4!homxb!whuts!mtune!codas!novavax!murphy!dave From: dave@murphy.UUCP (Dave Cornutt) Newsgroups: comp.unix.wizards Subject: Re: Absolutly hanging up a modem Message-ID: <688@murphy.UUCP> Date: Mon, 2-Nov-87 17:09:17 EST Article-I.D.: murphy.688 Posted: Mon Nov 2 17:09:17 1987 Date-Received: Fri, 6-Nov-87 22:16:09 EST References: <1548@bloom-beacon.MIT.EDU> <142700004@tiger.UUCP> <292@minya.UUCP> <4947@ncoast.UUCP> Organization: Gould CSD, Fort Lauderdale, FL Lines: 30 Summary: an ioctl specific to BSD In article <4947@ncoast.UUCP>, allbery@ncoast.UUCP (Brandon Allbery) writes: > Less portable versions follow: > > V7/BSD/Xenix 2.x: > #include > > hupfd(fd) { > struct sgttyb b; > > if (ioctl(fd, TIOCGETP, &b) == -1) > return -1; > b.sg_ispeed = b.sg_ospeed = B0; > return ioctl(fd, TIOCSETP, &b); > } Also, in BSD there's an ioctl, TIOCCDTR, that allegedly drops DTR without you having to close the fd (also TIOCSDTR, which raises it). I haven't tried these; I just saw them in the manual. --- "I dare you to play this record" -- Ebn-Ozn Dave Cornutt, Gould Computer Systems, Ft. Lauderdale, FL [Ignore header, mail to these addresses] UUCP: ...!{sun,pur-ee,brl-bmd,seismo,bcopen,rb-dc1}!gould!dcornutt or ...!{ucf-cs,allegra,codas,hcx1}!novavax!gould!dcornutt ARPA: dcornutt@gswd-vms.arpa "The opinions expressed herein are not necessarily those of my employer, not necessarily mine, and probably not necessary."