Article View: comp.protocols.kermit.misc
Article #3Re: kermit: please don't drop DTR
From: Frank da Cruz
Date: Mon, 16 Oct 1995 15:09
Date: Mon, 16 Oct 1995 15:09
36 lines
1777 bytes
1777 bytes
In article <45pc8d$r0i@agate.berkeley.edu>,
Ramon F Herrera <herrera@canaima.ME.Berkeley.EDU> wrote:
: Is there any way to tell kermit NOT to drop DTR when the user quits?
:
: I am using kermit just to dial to an Internet Service Provider,
: and therefore after quitting, the phone call should not be dropped.
:
: After kermit ends, I grab the IP address from the kermit log and
: start the SLIP daemon.
:
: Later, when all Internet exchange is done, I need to tell the
: serial port to drop DTR so the modems hangs up.
:
: I guess that if the port is set up with the HUPCL parameter,
: what I really need is to ask kermit not to close the file (port).
:
: Should I look for this line, comment it out, and recompile kermit?:
:
: close("/dev/tty0");
:
: Or should I set the port to -HUPCL, run kermit, quit, and then change
: the setting to +HUPCL?
:
: Any other suggestions or comments?
:
Long question, short answer:
It is a fundamental property of UNIX that when a program exits, either
explicitly (_exit()) or implicitly, all of the files that is opened are
closed. UNIX does this even if the program doesn't.
One way to accomplish what you want to do is to have a superior process
open the port, pass its file descriptor to Kermit (see the documentation),
and then when Kermit exits the superior process still has it open.
- Frank
Technical Details
Message-ID:
<45tsj0$211@apakabar.cc.columbia.edu>Path:
arc1-ca.pugleaf.net!watsun.cc.columbia.edu!fdcReferences:
<45pc8d$r0i@agate.berkeley.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!watsun.cc.columbia.edu!fdc From: fdc@watsun.cc.columbia.edu (Frank da Cruz) Newsgroups: comp.protocols.kermit.misc,comp.dcom.modems Subject: Re: kermit: please don't drop DTR Date: 16 Oct 1995 15:09:20 GMT Organization: Columbia University Message-ID: <45tsj0$211@apakabar.cc.columbia.edu> References: <45pc8d$r0i@agate.berkeley.edu> NNTP-Posting-Host: watsun.cc.columbia.edu