I want to start a process that does nothing but is still running. Say I start a process called sadhadxk
, and when I run pgrep -x "sadhadxk"
I will get the PID number back, like any normal process works.
So is there any way to start a dummy process?
Best Answer
You could do:
It should set both the process name and argv[0] on systems where it's supported so should show
sadhadxk
in bothps
andps -f
output, so should be matched by bothpgrep -x
andpgrep -fx
.