determining stdin/stdout from portops_t