+ if (is_numerical_argument) {
+ const unsigned long one_value_int =
+ strtoul(one_value_str, NULL, 10);
+
+ if (writer) {
+ const int ret = mi_lttng_integral_process_attribute_value(
+ writer, process_attr,
+ (int64_t) one_value_int, true);
+ if (ret) {
+ cmd_ret = CMD_FATAL;
+ goto end;
+ }
+ }
+
+ switch (process_attr) {
+ case LTTNG_PROCESS_ATTR_PROCESS_ID:
+ status = cmd_type == CMD_TRACK ?
+ lttng_process_attr_process_id_tracker_handle_add_pid(
+ tracker_handle,
+ (pid_t) one_value_int) :
+ lttng_process_attr_process_id_tracker_handle_remove_pid(
+ tracker_handle,
+ (pid_t) one_value_int);
+ break;
+ case LTTNG_PROCESS_ATTR_VIRTUAL_PROCESS_ID:
+ status = cmd_type == CMD_TRACK ?
+ lttng_process_attr_virtual_process_id_tracker_handle_add_pid(
+ tracker_handle,
+ (pid_t) one_value_int) :
+ lttng_process_attr_virtual_process_id_tracker_handle_remove_pid(
+ tracker_handle,
+ (pid_t) one_value_int);
+ break;
+ case LTTNG_PROCESS_ATTR_USER_ID:
+ status = cmd_type == CMD_TRACK ?
+ lttng_process_attr_user_id_tracker_handle_add_uid(
+ tracker_handle,
+ (uid_t) one_value_int) :
+ lttng_process_attr_user_id_tracker_handle_remove_uid(
+ tracker_handle,
+ (uid_t) one_value_int);
+ break;
+ case LTTNG_PROCESS_ATTR_VIRTUAL_USER_ID:
+ status = cmd_type == CMD_TRACK ?
+ lttng_process_attr_virtual_user_id_tracker_handle_add_uid(
+ tracker_handle,
+ (uid_t) one_value_int) :
+ lttng_process_attr_virtual_user_id_tracker_handle_remove_uid(
+ tracker_handle,
+ (uid_t) one_value_int);
+ break;
+ case LTTNG_PROCESS_ATTR_GROUP_ID:
+ status = cmd_type == CMD_TRACK ?
+ lttng_process_attr_group_id_tracker_handle_add_gid(
+ tracker_handle,
+ (gid_t) one_value_int) :
+ lttng_process_attr_group_id_tracker_handle_remove_gid(
+ tracker_handle,
+ (gid_t) one_value_int);
+ break;
+ case LTTNG_PROCESS_ATTR_VIRTUAL_GROUP_ID:
+ status = cmd_type == CMD_TRACK ?
+ lttng_process_attr_virtual_group_id_tracker_handle_add_gid(
+ tracker_handle,
+ (gid_t) one_value_int) :
+ lttng_process_attr_virtual_group_id_tracker_handle_remove_gid(
+ tracker_handle,
+ (gid_t) one_value_int);
+ break;
+ default:
+ abort();
+ }
+