/* For next loop */
one_pid_str = strtok_r(NULL, ",", &iter);
}
+ if (count == 0) {
+ ERR("Fatal error occurred when parsing pid string");
+ retval = CMD_ERROR;
+ goto error;
+ }
free(pid_string);
/* Identity of delimiter has been lost in first pass. */
break;
}
} else {
- MSG("PID %i %sed in session %s",
- pid_list[i], cmd_str, session_name);
+ if (pid_list[i] != -1) {
+ MSG("PID %i %sed in session %s",
+ pid_list[i], cmd_str,
+ session_name);
+ } else {
+ MSG("All PIDs %sed in session %s",
+ cmd_str, session_name);
+ }
success = 1;
}
}
}
- ret = print_missing_or_multiple_domains(opt_kernel + opt_userspace);
+ ret = print_missing_or_multiple_domains(
+ opt_kernel + opt_userspace, false);
if (ret) {
command_ret = CMD_ERROR;
goto end;