This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: system() (from libpthread) doesn't call cleanup handler when statically linked
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: "Carmelo Amoroso" <carmelo73 at gmail dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Sat, 27 Jan 2007 11:29:25 -0500
- Subject: Re: system() (from libpthread) doesn't call cleanup handler when statically linked
- References: <2ccd6e3c0701220243g4b29b5b3h11aa9025f9bf8af5@mail.gmail.com>
On 1/22/07, Carmelo Amoroso <carmelo73@gmail.com> wrote:
My proposal is:
1- make _pthread_cleanup_push_defer (and _pthread_cleanup_pop_restore)
a global undefined in static build.
2- change system implementation (libpthread.a:pt-system.o) simply including
the source file "system.c" forcing _pthread_cleanup_push_defer to be
resolved inside
libpthread.a:cleanup_compat_defer.o
3- provide a stub implementation into libc.a for
_pthread_cleanup_push_defer (and _pthread_cleanup_pop_restore) needed
when -lpthread is not used
Any comments are welcome.
If you think I'm correct, I could try to post a full patch
This is more of a meta-comment. I'm not famliar enough with this
particular interface to comment on your analysis. If you believe your
analysis correct please try to work on the patch. After you have a
patch you should run the testsuite on i686 and sh, comparing the
results before and after your patch. All of this information gives the
reader more confidence in your analysis, and may sway a reader to do
their own independant verification.
Remember that the glibc community is made up of volunteers. These
volunteers make decisions about how best to spend their time. It's
difficult to allocate time to a an idea, that even the poster is
unsure, is correct.
Cheers,
Carlos.