[Techtalk] using shell commands in perl scripts
meredydd at everybuddy.com
Sun May 25 18:22:31 EST 2003
On Sunday 25 May 2003 13:11, Rasjid Wilcox wrote:
> I'm really not sure what you are asking here. In all three cases /bin/ls
> is run as a child process. It has to be a seperate process, and since it
> is invoked by the perl script, it is its child. I assume there is a way to
> start a process so that it is not a child process, but I've never looked
> into it.
Actually, there isn't. If you look at the output of "pstree", you'll see that
everything is a child process of something else, right the way up to the
"mother of all processes", init, which is started by the kernel. If a
process's parent dies, it is simply reassigned to its parent's parent
(grandparent? :-P). As init cannot die, this produces a neat little
self-contained process tree.
More information about the Techtalk