https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80408
--- Comment #4 from Raphael Monod <raphael.monod at wanadoo dot fr> --- Thank you for your answer. But I don't understand why adding -lpthread option change the behavior if I do not use any thread. Moreover, if I refer to this page ( https://docs.oracle.com/cd/E19455-01/806-5257/gen-26/index.html ) write statement seems to be async-signal safe ? Where am I wrong ? Finaly, what can I do if I want to print a message in my trap function ? Thank you for your interest to my problem.