Fix. child struct for start(true, true) should be destroyed by child thread.
Fix. thread:join(0) in pthread should call pthread_join to free pthread_t struct.
Code refactoring.