From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <037ae9a47a48b476a861b44c0e356a9a.axp-list@archive.invalid> X-Archive-Original-Message-ID: <9702181221.AA02768@halfpint.rtp.avanticorp.com> Date: Tue, 18 Feb 1997 09:19:19 -0500 From: Uncle George Subject: Re: fclose() Richard Henderson wrote: > > > fclose(fchan); /* works */ > > fclose(fchan); /* segfaults */ > > Yep. malloc doen't like it when you free the same pointer twice. > That may be nice to blame malloc, but it should not have gotten that far - the channel is closed!!! fclose should be returning an error. A segfault is not appropriate under any circumstances fd = open(); close(fd); /* system allows it */ close(fd); /* OS Paniks-is this what u want!!*/ /* Or acceptable? */ > > Ok, so Who's in charge of this code, so I relay my findings? > > Me, I guess. This is a known occurrence. The bug, though, > is with the program trying to fclose twice. The solution of > course is not to do that. that is one bug, the other is of course the segfault.This didn't happen under the static lib's in 3.0.3 - only occured in the redhat 4 series gat -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com