I don't quite understand the description of the PPID in the sh manual.

>PPID The shell's parent process ID. Subshells have the same
> PPID as the parent of the current shell.

PPID is the shell's parent's pid, okay (by the way, shouldn't the
second "'s" be added?). But, according to the next sentence, subshells
have the same value in their PPIDs as the current shell's parent have
in its PPID. Is it correct?

Also, I had a problem understanding how does cd work. It is stated
there that when cd is called with argument not starting with a slash
or dot then CDPATH is searched, but what if the variable is unset? It
says nothing about such case.

>cd [-L | -P] [dir]
>Change the current working directory to dir, or $HOME by default. If
>dir is set to `-', change to the previous working directory and print
>the (now current) working directory. If dir does not begin with a
>slash or dot, CDPATH is searched for the directory.

ksh manual says that the current directory is searched in such case.
Does sh's cd work the same way? If so, it might be good idea to include
that to the manual.

Thank you.

Reply via email to