In the threads, I do some work and some sleeping (using select()). Anyway, when my threads are done and have joined main thread, I see the final "done" message, and I assume return 0 is called, but I get a delay of several seconds before my program actually exits (i.e. returns focus to command prompt). The delay varies from maybe 5-15 seconds. It's strange...my threads have fully exited I assume because they have joined, and my main() shouldn't be doing anything else. Anyone got a clue on this one?