Base WG Resolution Ref: bwg98-001
Topic: process termination

This is an approved Base Working Group Resolution for XSH Issue 5 .

Last update: 23 February,1998

								98 #001


	Topic:			process termination
	Relevant Sections:	pthread_exit
	Spec:			XSH Issue 5 

Resolution Request:

POSIX96 states the following requirement in section, page 340,
line 249:

"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 the time of thread termination."

VSTH tests this requirement by creating a child process and waiting
on the process to obtain the exit status. The child process returns
from the main thread without an explicit pthread_exit() or return()
statement. The test expects WIFEXITED(status) to be TRUE and
WEXITSTATUS(status) to be 0.

This requirement appears to conflict with the ANSI C standard, section, "Program Termination" :

"A return from the initial call to the 'main' function is equivalent to
calling the 'exit' function with the value returned by the main function
as it's argument. If the 'main' function executes a return that
specifies no value, the termination status returned to the host
environment is undefined."

Resolution Response
Forwarded to the PASC 1003.1c Interpretations committee.

Circulated for review: Jan 23 1998
Approved: Feb 1998