How do I use C within a program to assert that there are no threads (for example, by listing and counting them if necessary)?
I want to write a program that forks early-on before any threads are created but I want the application to abort if another developer changes a module in a way that a thread is created before the fork.
This is so we will find out about it and respond to ensure the thread creation code is moved so it runs after the fork.