Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2002-08-24 12:27:34


Peter Dimov wrote:
[...]
> What value do you return when the thread function has ended with an
> exception?

Functions with non-empty exception specifications aside, unless that
exception was explicitly "declared" to be propagated on join (whether
a function has some non-void return value doesn't really matter, IMO),
I'd "return" something along the lines of EXIT_FAILURE. ;-) ;-)

Well, actually, abort() [standard terminate() method/handler] will
take care of it: < quoting ISO C standard, "99" version though >

"The abort function causes abnormal program termination to occur,
 unless the signal SIGABRT is being caught and the signal handler
 does not return. Whether open streams with unwritten buffered
 data are flushed, open streams are closed, or temporary files
 are removed is implementation-defined. An implementation-defined
 form of the status unsuccessful termination is returned to the
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 host environment by means of the function call raise(SIGABRT)."

regards,
alexander.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk