On Wednesday, March 27, 2002, at 11:39 AM, Baskaran Subramaniam wrote:
I am not sure if this is a bug even though Matt has filed it as a bug.
According to POSIX 1003.1c-1995 interface definition (page 315 of
Programming with POSIX threads by David R. Butenhof):
pthread_exit(void *value_ptr) terminates the calling thread, returning
the value value_ptr to any joining thread.
pthread_join(pthread_t thread, void **value_ptr) waits for the thread to
terminate, and return thread's exit value if value_ptr is not NULL.
This also
detaches thread on successful completion.
What is wrong with the way these functions are behaving currently in
darwin/Mac OS X?
Isn't LinuxPPC doing something that is not required by the POSIX spec?
The process shall exit with an exit status of 0 after the last thread
has been terminated. The behavior shall be as if the implementation
called exit() with a zero argument at thread termination time.
"return n;" from main() is supposed to terminate the program as if
exit(n) were called. This "evaporates" any remaining threads.
pthread_exit() from main is supposed to terminate the main thread, but
the program will not exit until the last thread terminates.
matt.
_______________________________________________
unix-porting mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/unix-porting
Do not post admin requests to the list. They will be ignored.