My linux system: Ubuntu 11.04 Natty Narwhal
I noticed recently that when I start up a certain program, that it appears to be running duplicate processes. The program is called jnos and here's a partial printout from the 'ps -ef' instruction:
root 2773 2720 0 22:18 pts/1 00:00:00 sudo ./jnos
root 2775 2773 0 22:18 pts/1 00:00:00 ./jnos
Other programs, which I start in a similar fashion (sudo ./filename) only run one process which is what I expect to have happen.
What should I look for as a cause for the duplicate processes?
Thanks for your help.
Looks like the program 'jnos' forks a child and continues to run.
Do strace during execution and check out for 'clone' system call.
I ran my program using the following instruction:
'sudo strace -o stracesave.txt ./jnos'
The file stracesave.txt has 575 pages of information. The word 'clone' appears frequently. The first instance is as follows:
pipe([5, 6]) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGC HLD, child_tidptr=0xb78a3728) = 5083
I have the problem of a) not understanding what I read in the strace file; b) even if I understood it, I would not know what to do to change it....but I'm a quick learner.
More hints ?