Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!necntc!ima!minya!jc From: jc@minya.UUCP (John Chambers) Newsgroups: comp.unix.wizards Subject: Re: Absolutly hanging up a modem Message-ID: <292@minya.UUCP> Date: Thu, 22-Oct-87 08:19:07 EDT Article-I.D.: minya.292 Posted: Thu Oct 22 08:19:07 1987 Date-Received: Sun, 25-Oct-87 01:47:52 EDT References: <1548@bloom-beacon.MIT.EDU> <142700004@tiger.UUCP> Organization: home Lines: 32 Summary: What's the "Drop DTR" command? > > > ... and I need to make sure that after the call is > > >supposedly over, the line is definitely hung up. What can I do to > > >accomplish this? > > > > Drop DTR. > > ...Then kick it around the room a few times.... If that does not > work, then unplug the thing.... :-) :-) (could not resist) > Good suggestion. Much better than the "Drop DTR" suggestion. True, this is what the modem expects (if it isn't in command mode) But does anyone know the Unix call (for Sys/V and BSD and Xenix and ...) that does this? Presumably the guy wasn't talking about how to hack the kernel to make it twiddle the DTR line; he was asking how his user-mode program does it. I've spent a lot of time on a lot of systems trying to figure out how the *#&$@^ you get the DTR line to drop, and to my knowledge, there is no way to do it that works on all serial ports on all systems. It's often very hard to figure out how to do it on one specific system. Oh, sure, I know about hupcl; who doesn't; but that's not the answer. Would you like a list of the systems I've seen where the line stasy connected despite the closing of the file by all processes? Furthermore, how does a program hunt down and kill all processes that may have the file open? And do you really want to do it that way? If anyone has a C function that will reliably cause any model of modem to hang up on any serial port on any Unix system, I sure would like to see it. I could have used it years ago. -- John Chambers <{adelie,ima,maynard,mit-eddie}!minya!{jc,root}> (617/484-6393)