remove cmdpid & change return type of server_exec