lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV Aborting transfers gracefully


From: David Combs
Subject: Re: LYNX-DEV Aborting transfers gracefully
Date: Sat, 19 Oct 1996 06:31:27 -0700

> From address@hidden Thu Oct 17 04:14:39 1996
> Date: Thu, 17 Oct 1996 12:47:18 +0200 (MET DST)
> From: Ulrich Windl <address@hidden>
> To: address@hidden
> Subject: LYNX-DEV Aborting transfers gracefully
> MIME-Version: 1.0
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> Sender: address@hidden
> Errors-To: address@hidden
> Precedence: bulk
> Reply-To: address@hidden
> 
> I'd wish lynx would abort slow transfers when I hit ^C; instead it aborts
> the whole program.
> 
> Ulrich Windl


Here's what I do in my programs.

I catch ^C, and each time I do, I add one to a global counter.

Inside of critical loops, I test that counter for non-zero;
if so, I nicely exit that loop, cleaning up, etc.   I even had
a stack of these things.

That was before I had exceptions in the language I use --
they then at least had a crude stack-unwinder, and I used
this.

But now I STILL use the ^C catching and counting -- as
a "safe" way of catching  the ^C and doing something
with it.

If the counter hits FIVE, I ask, via very simple i/o,
"do you really want to quit this program XXX?".

You need that, incase there is the usual bug somewhere
and there is no way to exit other than kill -9.

My (lynx) problem with ^C isn't trying to stop a download,
but INADVERTENTLY hitting ^C in a knee-jerk kind of
response when I am in a hurry, by mistake.

I do think ^C should not be INSTANT death -- a "are you
sure", coded very low level, would make it much more
uh, ergonomic.
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]