This is platform dependent.

In windows you can use the GetExitCodeThread Function to retreave the return value.

Hope this helps.