Date: 23 Jul 2001 14:04:47 +0200 From: Assar Westerlund <assar@FreeBSD.org> To: Alfred Perlstein <bright@sneakerz.org> Cc: Brian Somers <brian@Awfulhak.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libutil ecalloc.c emalloc.3 emalloc.c erealloc.c estrdup.c Makefile libutil.h Message-ID: <5ln15vx34w.fsf@assaris.sics.se> In-Reply-To: Alfred Perlstein's message of "Mon, 23 Jul 2001 01:09:03 -0500" References: <assar@FreeBSD.org> <200107230223.f6N2Nfg14201@hak.lan.Awfulhak.org> <20010722223812.L49508@sneakerz.org> <5lr8v88d1m.fsf@assaris.sics.se> <20010723010902.M49508@sneakerz.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein <bright@sneakerz.org> writes: > > `Only use these functions when the only action on failure is to exit > > the program' ? > > s/exit/when there is no state that might need recovering from/ Yeah, I was trying to say both that there is no cleanup needed and exiting is the right error handling. > Basically, any subroutines that may fail for one reason or another > _and_ use these functions become cancellation points, meaning they > are unsafe to call if there is any in progress transactions that > may need cleanup. It taints code. :( Yes. You should not do this (independently if it's as code or a function call) in a library. /assar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5ln15vx34w.fsf>