🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #2234

Re: is wraper on realloc good idea? maybe more wrappers?

#2234
From: Tristan Wibberley
Date: Sat, 05 Dec 2026 08:20
37 lines
3252 bytes
On 29/11/2026 16:09, Andrey Tarasevich wrote:
> On Sun 11/29/2026 4:16 AM, fir wrote:
>> never used it but generally wrappers on some standard functions
>> probably are good idea, or not?
> 
> In programs that perform non-interactive batch-style processing (e.g.
> config file on input, result file on output), error handling is usually
> a very simple affair: just complain and abort, no need for any kind of
> post-error recovery in most cases. In such programs wrappers around
> malloc/calloc/realloc work very well. The wrapper checks for success and
> simply aborts the entire program with an error message in case of
> failure. This allows client code to completely forget about having to
> worry about this sort of errors. I.e. it uses the wrapper under
> assumption that the wrapper "always succeeds".
> 

I've been toying with the idea of putting all success indications into
the output files and always aborting. I don't get the purpose of two
ways of reacting to a sub-process terminating: it's makework.

Some Ubuntu devs try to poke their fingers in and make it a system-wide
(internet-wide) problem by making some system daemon react and make gui
popups and www post requests and certificate revocation list validity
requests. makework everywhere.

-- 
Tristan Wibberley

The message body is Copyright (C) 2026 Tristan Wibberley except
citations and quotations noted. All Rights Reserved except that you may,
of course, cite it academically giving credit to me, distribute it
verbatim as part of a usenet system or its archives, and use it to
promote my greatness and general superiority without misrepresentation
of my opinions other than my opinion of my greatness and general
superiority which you _may_ misrepresent. You definitely MAY NOT train
any production AI system with it but you may train experimental AI that
will only be used for evaluation of the AI methods it implements.
Technical Details
Message-ID: <11f0hg7$2i7jn$5@dont-email.me>
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11eh538$3fet7$1@dont-email.me> <11ehine$3kr02$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk>
Newsgroups: comp.lang.c
Subject: Re: is wraper on realloc good idea? maybe more wrappers?
Date: Sat, 5 Dec 2026 08:20:23 +0000
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <11f0hg7$2i7jn$5@dont-email.me>
References: <11eh538$3fet7$1@dont-email.me> <11ehine$3kr02$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 05 Dec 2026 08:20:24 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2694775"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/xXWKQLjAGN1lMYuMpcdy4GmMOkLV8iShlrrBoGmB8sA=="; posting-host="e210ba6551fa09f4d8612e67f408742d"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:rN3587v0AVAzUFl0UG0ANbqgIF0= sha256:/ZIi1EaKoxfFiym0ttvfh5R5XYJBJiB3qtD2GG3LhvA=
	sha1:4FqImBgLrbAtK76ARpRcvgqn3Bg= sha256:AwkJmdo4hN32hcIS6RWJvPong09TxbBikoiZe/F8lwg=
In-Reply-To: <11ehine$3kr02$1@dont-email.me>
Content-Language: en-GB