identify the child shell

how can we identify which child shell being created by the sh command.
Is it necessary that the child shell created will be the same as parent shell or it may be different.
How can we change this setting?

please help
Thanks in advance

If you run "sh" you will get a process running "sh".

If you are running a script the shell will either be:

(a) if the first line says "#!XXXX" then XXXX will be taken as the shell

else

(b) the same type as the currently executing shell