What do you mean by "crashes"??
xp_cmdshell
doesn't crash, so your statement doesn't make any sense.
It does, however, return a 0 or 1 depending on if the command was successfully launched. It does NOT tell you if the command it launched was executed successfully or not.
OH, and for future reference, you might want to read
these[
^].