Path: utzoo!utgpu!watmath!clyde!att!ucbvax!bloom-beacon!mit-vax!keith
From: keith@mit-vax.LCS.MIT.EDU (Keith Packard)
Newsgroups: comp.unix.wizards
Subject: Re: vhangup
Message-ID: <5197@mit-vax.LCS.MIT.EDU>
Date: 3 Dec 88 04:28:44 GMT
References: <13@cmdfs2.intel.com> <2246@bucsb.UUCP>
Reply-To: keith@expo.lcs.mit.edu (Keith Packard)
Organization: MIT Laboratory for Computer Science, Cambridge
Lines: 25

In article <2246@bucsb.UUCP> jbw@bucsf.bu.edu (Joe Wells) writes:
>In article <13@cmdfs2.intel.com> kseshadr@cmdfs2.intel.com (Kishore Seshadri~) writes:
>>I was wondering if anyone had any experiences( pleasant or unpleasant)
>>with the vhangup() call. I'd appreciate any suggestions...
>
>This reminds me of a good quote:
>
>	Whoa!  Don't look at vhangup(2) immediately after eating food.

Admittedly, the vhangup code in 4.3 is terrible.  But, it can be made very
useful.  The current code turns off read/write bits in the file table.  A
big mistake, as the file remains "open", which causes the carrier to remain
up and other problems.

The "fix" I wrote was to redirect these file entries to /dev/null (or,
failing that, to / with write turned off) by faking an open.  This and some
other surgery in the device drivers solved most of the dialin troubles on
that machine.

Removing vhangup isn't going to make the problem go away; either you kill
all processes with open descriptors on the device, or you use a kludge
like vhangup and keep them alive.

Keith Packard
keith@expo.lcs.mit.edu