lkml.org 
[lkml]   [2000]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: SIGSEGV on fclose
From
Date
Manfred Spraul <manfred@colorfullife.com> writes:

> I assume that the other unices store a magic number within the stream
> structure, but that's ugly and doesn't guarantee an error message: you
> replace a 100% sigsegv with a rare race - I prefer the sigsegv.

Can we all stop this nonsense now. Manfred's comment summarizes the
situation pretty well. One of the basic design rules of glibc is to
crash early whenever something is wrong since all workarounds (like in
this case) never have a 100% chance to survive.

There are ways to handle this correctly but a) it's much slower in
penalizes correct programs and b) will lead to unavoidable memory
leaks.

If you don't agree with this, write your own C library. It's the most
effective debugging tool, especially with respect of portability.

(And yes, the behavior is 100% correct with respect of ISO C.)

--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.044 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site