I'm currently working on a stub for tests purpose. Using Python I need to create a process with a specific name ("mysoft") and a specific pid ("1234")
My final purpose is to be able to run the command "pgrep mysoft" on a terminal and get the PID I set (1234).
The process doesn't need to do anything, it just need to exists.
I looked at the subprocess module but I think this is not exactly what I need. What do you think ?
pgrepto return a specific PID?myfile', make it executable and start it with a shebang#!/usr/bin/python(not#!/usr/bin/env python!). Now when you execute it directly it should show up asmysoftin the process table.