multi-threading using linux system calls & glib