gdb and nanosleep() issues