Hello, Not exactly infinite loop but sigsuspend. Infinite loop was only example to show the problem. Without printf in sig handler problem also occures. I am writing simple stop-the-world garbage collector so I need this construction to stop (almost)all threads in application. I think only solution for this problem is not using any stream that client application may use. Thanks for help anyway :) W dniu 26 lipca 2009 15:58 użytkownik Gunnar Larisch <gunmuc@xxxxxxxxxxxxxx> napisał: > Hi Mirski, > > your signal handler function: > >> >> void suspend(int sig) { >> >> printf("suspending\n"); >> >> fflush(stdout); >> >> while(1); >> >> } > > Have you also tried your programm without calling printf and fflush in the > signal handler? Do you know the manpage signal (7) ? There is a list of > Async-signal-safe functions. > > Can you tell me, why you need an endless loop in the signal > handler? > > Regards, > Gunnar > -- To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html