I have a script (.sh) where I launch applications like this
#!/bin/sh ./application1 configuration1.cfg param1 param2 param3 & sleep 2 ./application2 configuration2.cfg param1 param2 param3 & sleep 2
Is there a way that I can assign the CPU affinity as I launch the process?
I don't really want to do it after the fact. I could do it programatically from C++, but it seems that the shell is the best way to do it.
Then, once launched, how do I verify that it is indeed stuck to that CPU/core?