pthread for linux, return number of failed from main