From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <6f5fd9d621754d33e66306c1373bf64b@quanstro.net> Date: Fri, 9 Jun 2006 19:45:40 -0500 From: quanstro@quanstro.net To: 9fans@cse.psu.edu Subject: Re: [9fans] quantity vs. quality In-Reply-To: <20060610025147.GA22339@ionkov.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 66ecab18-ead1-11e9-9d60-3106f5b1d025 i don't know if it's good code or bad code in general. i was pointing out that it is possible to catch a call to sysfatal and do something else, since you seemed to indicate that was not possible. it may be a good strategy if you really feel that sysfatal needs to be caught for your particular application. the advantage is that other, simplier applications need not be complicated by handling things like malloc failures. - erik On Fri Jun 9 19:46:28 CDT 2006, lucho@gmx.net wrote: > > sure you can. sysfatal calls _sysfatal to do the deed. redefine that to call your > > fancy cleanup routine and you're golden. > > And you think that's an example of writing good code? I thought we are > talking about a system with clean design that you don't need to use kludges in :) > > Lucho