Messages in this thread | | | Subject | Re: SIGSEGV on fclose | From | Ulrich Drepper <> | Date | 13 Jul 2000 08:51:48 -0700 |
| |
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/
| |