Hello, Am Mittwoch, den 12.08.2015, 10:04 -0400 schrieb Rich Felker: > On Wed, Aug 12, 2015 at 04:36:20PM +0300, Eugene wrote: > > Hello, > > > > I have problem with threads. > > Main thread waits for input through function fgets(). > > Other thread calls function exit() and hangs up. > > Main thread continues working. > > ... > As far as I can tell this is the required behavior specified by POSIX. > I raised a related issue with the standards body in 2012 and the > effects on exit were deemed intentional. See: > > http://austingroupbugs.net/view.php?id=611 yes, this behavior also seems to be in line with C11 threads and io. If you want to exit (and not abort) under such circumstances you could use the C11 function quick_exit, which musl implements. Jens -- :: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS ::: :: ::::::::::::::: office Strasbourg : +33 368854536 :: :: :::::::::::::::::::::: gsm France : +33 651400183 :: :: ::::::::::::::: gsm international : +49 15737185122 :: :: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::