Autor: Rainer Weikusat Datum: To: dng Betreff: Re: [DNG] Doing away with multi-threading in my project (netman)
Edward Bartolo <edbarx@???> writes: > Quote: <<An 'orphaned process' is one whose parent has exited after creating a
> process (that's done via fork and not via execve) and it's not adopted
> by the grand parent but by init.>>
>
> So what is the difference between an "orphaned process", i.e. a
> process whose parent has exited after giving birth to a child process
> and one which replaces the original process effectively giving its
> parent a death sentence?
The difference is that the second case doesn't occur. You can think of
'a process' as sort-of a container the kernel uses for running a
program: In order to execute a specific program, it has to be put into a
process first and that's what the exec* calls do. They load a new
program/ executable file into an existing process so that it will be
executed instead of the program the process had been executing so far.
The complete list of modifications an existing process undergoes when
starting to run a new program is in execve(2) ('man 2 execve').