*BSD News Article 61767


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!news.kei.com!newsfeed.internetmci.com!news.exodus.net!aimnet.com!ns2.mainstreet.net!bug.rahul.net!a2i!rahul.net!a2i!mthorn.a2i!mthorn
From: Mike Thornburg <mthorn@rahul.net>
Newsgroups: comp.sys.mac.comm,comp.unix.bsd.freebsd.misc
Subject: Re: ctrl-c with NCSA telnet 2.7b4 and FreeBSD 2.1-RELEASE
Date: 11 Feb 1996 09:13:11 GMT
Organization: a2i network
Lines: 59
Message-ID: <4fkbv7$qev@hustle.rahul.net>
References: <andrew-0502962345110001@dslip2.its.utas.edu.au> <cswan-0602962336200001@swan.actrix.gen.nz>
NNTP-Posting-Host: bolero.rahul.net
NNTP-Posting-User: mthorn
Xref: euryale.cc.adfa.oz.au comp.sys.mac.comm:132419 comp.unix.bsd.freebsd.misc:14054

In article <cswan-0602962336200001@swan.actrix.gen.nz>,
Christopher Swan <cswan@actrix.gen.nz> wrote:
>I've got to admit to not knowing NCSA from a bar of soap, but the fact
>that ^c is also your 'terminate' key looks pretty suspicious ...
>
>>I guess this is probably no more than a configuration error but when I try
>>to cancel composing a message in PINE (^C) PINE terminates. I can remove
>>all references to ^c from stty -a but then I cant abort traceroutes etc.
>>
>>My setup is as follows:
>>
>>Client: PowerMac running NCSA Telnet 2.7b4.
>>
>>   Session:Setup Keys reads Interupt = ^c
>>                            Suspend Output = ^S
>>                            Resume Output = ^Q
>
>-- 
>
>Cheers, Chris
>
>-----------------------------------------------------------------------
>Christopher Swan                                 CompuServe 100354,3427   
>PO Box 11567, Wellington, New Zealand                 or Raine@kagi.com
>-----------------------------------------------------------------------

I missed the original post on this subject, but the problem is exactly
that ^c is the interrupt key, and is not being sent to the host at the
far end as a character, but as the telnet "interrupt process" signal.

There is a problem with NCSA telnet 2.7b4 and FreeBSD 2.0.5 where if
^c is defined as the interrupt key in NCSA telnet, FreeBSD will suspend,
rather than kill, a process when ^c is typed.  I don't know if this is still
a problem with FreeBSD 2.1 -- I suspect so, since I understand the bug is
in NCSA telnet 2.7b4.  The fix is to define the session in NCSA telnet so
that you have *NO* interrupt process key (you can always send the interrupt
process signal by typing <command-y> or by going to the Network menu, anyway.
Usually you don't need to send the interrupt process signal; if the interrupt
process character gets to the far side as a character, the Unix terminal
driver will generate the proper Unix interrupt signal in the usual manner.
This also allows a program like pine to work, since it does its own stty
internally so that ^c will not generate an interrupt signal while pine is
using the terminal.)

A setup that works for me using NCSA telnet 2.7b4, FreeBSD 2.0.5, and
pine is to leave stty intr at its usual Unix default of ^c (if needed, you can
give the command "stty intr \^C" to reset the default. note: "^C" is 2
characters) and to go to Session:Setup Keys in NCSA telnet and delete
the entry for interrupt process.  When you have confirmed that this works, 
go to Preferences:Sessions in NCSA telnet and edit the session you are using
for the connection to the FreeBSD box so that the correction will be saved
for the next time you connect to this host.

With the setup I have described I can type ^c in pine and have it abort
actions without killing pine, yet at the same time I can interrupt programs
like traceroute and ping by typing ^c.
-- 
----------------------------------
Mike Thornburg    mthorn@rahul.net