Hi,
I have a Unix script which I start and then immediately after starting it I check to see if another process with the same script name but not the same current process id is running.
What I noticed is that when I launch this script. Just by calling its name from another script there are 2 distinct processes created for a time. Even though I launch the script once. One process has a status of R and the other has a status of S.
After a few seconds the second process disappears again and only the first one remains.
Could anyone please help me understand why this is happening? Why might one script start 2 distinct processes (each with a different state) at any stage?
Any ideas or suggestions would be much appreciated.