I need to set PID number of my process to fixed value, because I need to kill it with my application when some conditions are met, is it possible to do that?


AFAIK. It is not possible to allocate particular PID to any program but you can save your programs PID value by few ways

a. pidof PROGRAM_NAME => It will give you PID of that program
b. PROGRAM_NAME & PID_NO=$! => It will save PID of program into PID_NO variable

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.