Fix status value for simple_command.
Modified logic to handle forking.