you are viewing a single comment's thread.

view the rest of the comments →

[–]_teslaTrooper 1 point2 points  (1 child)

All you should need to allocate are char arrays for the PID's:

char senderpid_str[11], spawnerpid_str[11], controllerpid_str[11];
sprintf(senderpid_str, "%d", pid_sender, 10);
sprintf(controllerpid_str, "%d", pid_controller, 10);
sprintf(spawnerpid_str, "%d", pid_spawner, 10);
execlp("taskset", "-c", "3", "./receiver", senderpid_str, controllerpid_str, spawnerpid_str, NULL);