A really simple chat in C using thread