Home

kindprocessen

Kindprocessen, or child process, is a process created by another process, the parent. In most operating systems, processes are organized in a hierarchical tree. The child receives its own process identifier (PID) and typically inherits attributes from the parent, such as user credentials and some open file descriptors, but it has an independent execution context.

Creation and execution

In Unix-like systems the common method to create a child is fork(), which creates a new process

Lifecycle and termination

The parent can wait for the child’s termination to obtain its exit status. If the parent exits

Communication and usage

Inter-process communication mechanisms such as pipes, signals, and shared memory enable coordination between parent and child.

with
a
copy
of
the
parent's
memory
space.
The
child
may
then
replace
its
program
image
with
execve()
to
run
a
new
program.
In
Windows,
CreateProcess
performs
a
similar
role.
After
creation,
the
parent
and
child
run
concurrently;
the
child’s
memory
is
separate
from
the
parent’s,
with
copy-on-write
semantics
in
many
environments.
The
child
may
continue
to
run
or
execute
a
different
program
after
an
exec-like
step.
before
the
child,
the
child
becomes
an
orphan
and
is
adopted
by
the
init
process
(PID
1
in
many
systems).
When
a
child
terminates,
it
releases
resources
only
after
the
parent
reaps
it;
otherwise
the
process
entry
remains
as
a
zombie
until
waited
on
by
the
parent.
Proper
reaping
prevents
resource
leakage.
Kindprocessen
are
used
for
parallel
task
execution,
creating
daemons,
building
processing
pipelines,
and
maintaining
worker
pools
in
various
applications.