Hi,
Why process ID's are changed for shell, while running the ps command after running script command?
Regards
anon 10055
Hi,
Why process ID's are changed for shell, while running the ps command after running script command?
Regards
anon 10055
Anon10055,
I am not sure I follow the question. PIDs for the ps command will keep on changing because a new process is spawned everytime you type ps and press enter. For the spawned off shell, they will remain the same. Please clarify, otherwise this thread is up for speedy deletion.
Thanks,
Anup
Hi,
Yes..PID will be changing, here i am running ps command then script command and then ps again, in this case PID of bash has changed, In normal case it doesn't...why?
Regards
anon 10055
I can give the answer, but, it would be interesting if you figure this out yourself. Do a pstree from the script instead of ps, you will notice two shells. PID for only one of them will be changing.
Cheers,
Anup