I tried several times to get answer to the below problem. Someone can please help me?
[tmp]$ cat p1.sh
#!/bin/sh
`./c1.sh &`
while [ 10 -le 11 ] # indefinite loop
do
x=5;
done
[tmp]$ cat c1.sh # sleep for 10 sec and exit
#!/bin/sh
sleep 10;
Execute P1 as ./p1 &
[ tmp]$ ps -eaf | grep c1
pp1 20487 1 0 22:37 pts/14 00:00:00 /bin/sh ./c1.sh
[ tmp]$ ps -eaf | grep p1
pp1 20485 19920 6 22:37 pts/14 00:00:00 /bin/sh ./p1.sh
(1) Why does the PPID of c1.sh has been assigned to 1? Why can't it be PID of p1.sh? Thanks in advance