$$ gives you the pid of the current shell that is why it is giving you the pid of the script or session that is calling the nohup statement. you need to place the print $$ within script.ksh and script2.ksh or you will have to get the pid list of the child processes of the current shell. I'll try to paste that part once I figure it out ... but for now see if it is feasible to place those commands within script.ksh and script2.ksh.