Might want to add a comment here: Checking for 255 because that is the 2s complement encoding of -1. Exit codes coming from the terminal are encoded in 16-bit