Re: Why leave the error handling to the caller?
- From: dj3vande@xxxxxxxxxxxxxxxxxxx (Dave Vandervies)
- Date: Thu, 21 Jun 2007 14:57:46 +0000 (UTC)
In article <467a4fd5.265449486@xxxxxxxxxxxxxx>,
Richard Bos <rlb@xxxxxxxxxxxxxxxxxxxxxx> wrote:
dj3vande@xxxxxxxxxxxxxxxxxxx (Dave Vandervies) wrote:[snip xmalloc code that terminates program on allocation failure]
From the OpenSSH 4.6 source code:
I wouldn't exactly call SSH "not real world". I think you'd have trouble
arguing that the people who wrote this code didn't carefully consider
what was and wasn't appropriate behavior on memory allocation failure
before they wrote it this way, even if you disagree with their conclusion.
That's as may be, but I do hope that that code didn't find its way into
the SHTTP parts of, e.g., Firefox.
I expect not; I believe OpenSSH uses OpenSSL for its encryption, and
other code that needs encryption would be more likely to build on top
of OpenSSL (with, one hopes, more reusable-library-appropriate error
handling) than OpenSSH.
Crash&dump is all very well for a
small command line tool, but if an application can hold any serious
amount of data in memory, it's an evil thing to do to your users.
You're thinking too small. Firefox likes to bring the whole windowing
system down on resource allocation failures. (Though I haven't used
recent versions for long-running sessions, so there's a chance they
might have finally fixed that.)
dave
--
Dave Vandervies dj3vande@xxxxxxxxxxxxxxxxxxx
I presume the difference is that Laurier's off-campus environment includes the
University of Waterloo, whereas the best we can offer by way of off-campus
environment is, well, Laurier. . . . --Chris Redmond in uw.general
.
- Follow-Ups:
- Re: Why leave the error handling to the caller?
- From: Richard Bos
- Re: Why leave the error handling to the caller?
- References:
- Why leave the error handling to the caller?
- From: Chad
- Re: Why leave the error handling to the caller?
- From: Richard Heathfield
- Re: Why leave the error handling to the caller?
- From: Dave Vandervies
- Re: Why leave the error handling to the caller?
- From: Richard Bos
- Why leave the error handling to the caller?
- Prev by Date: Re: about structures memory allocation
- Next by Date: Re: getchar() problem
- Previous by thread: Re: Why leave the error handling to the caller?
- Next by thread: Re: Why leave the error handling to the caller?
- Index(es):
Relevant Pages
|