Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!bcm!convex!news From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.unix.programmer Subject: Re: Complexity of reallocating storage (was users command crap) Message-ID: <1991Feb07.073359.28667@convex.com> Date: 7 Feb 91 07:33:59 GMT References: <8921@sail.LABS.TEK.COM> <1991Feb07.013637.6542@convex.com> <17660:Feb706:04:4191@kramden.acf.nyu.edu> Sender: news@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 50 Nntp-Posting-Host: pixel.convex.com From the keyboard of brnstnd@kramden.acf.nyu.edu (Dan Bernstein): :In article <1991Feb07.013637.6542@convex.com> I wrote: :> Regarding problem 1, I like to see error messages in this form: :> program: operations on object: reason : :It's even better when you're given an error level: debug, info, warning, :critical, fatal. Gee, where did we get those from? :-) :> On problem #2, I think that if you have no stderr, (and even if you do :> for system programs) you should also syslog the problem. It's not a :> perfect solution, but it's surely better than nothing. : :Okay, you're right. In alt.sources is my first distributed program that :actually makes some use of syslog. Congrats. :I'm still worried that people will :think syslog is reliable or secure, and I'm very worried that someone :may come to depend on syslog or believe that it isn't worth using better :systems. But for the moment I guess it is the best alternative. Right. :> I know people say not to check for errors that you don't know how to :> handle. I think they're wrong. That's what asserts are all about. : :Huh? An assertion is just one type of error handler, and a very clumsy :one at that. Dumping core is rarely the right way to handle an error in :a production program. Well, maybe so. But even the kernel does this sometimes: panic: trap: unresolved kernel pte violation (proceeds to dump to swap or some such) Which to me is just a big "segmentation fault -- core dumped". Maybe a core dump is too strong, but to keep running when your internal assumptions have been proven wrong is just asking for terrible trouble. --tom -- "Still waiting to read alt.fan.dan-bernstein using DBWM, Dan's own AI window manager, which argues with you for 10 weeks before resizing your window." ### And now for the question of the month: How do you spell relief? Answer: U=brnstnd@kramden.acf.nyu.edu; echo "/From: $U/h:j" >>~/News/KILL; expire -f $U