Older blog entries for drunen (starting at number 2)

An interesting thing happened using gdb on linux today. If I try to block on poll() in a multithreaded program, poll wakes up continuously, thanks to SIG32, aka SIGRTMIN. Seems pthreads is using this to change thread contexts, and gdb doesn't seem to get it. However if I block on pthread_cond_timedwait, this isn't a problem, nor is it unexpected, since pthread_cond_timedwait can't be interrupted via a signal. Perhaps there is a gdb handle command I havent tried yet.

I was thinking about writing a signal handler that caught SIGSEGV and SIGABRT that basically dumped the stack using the backtrace call in /usr/include/execinfo.h. Too bad the linux kernel just won't dump core the right way for multithreaded programs. Too bad the kernel doesn't know about pthreads.

I've been thinking about using the sgi's state threads package. It looks interesting, despite being NPL.

What I wouldn't do for a g++ that could do precompiled headers.

Apparently pthread_cond_timedwait() doesn't return EINTR when a signal is thrown, despite what the man page says. I should have looked at condvar.c before writing a little test program.

Use the source, Luke.

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!