Use boolean for exit

It is portable rather than number.