[Python-de] Threading *und* zweimal Forken (Daemon)
Christian Heimes
christian at python.org
Mi Dez 5 18:53:55 CET 2012
Am 05.12.2012 18:41, schrieb Diez Roggisch:
>> Außerdem
>> läuft im Child nur noch der Prozess, der fork() aufgerufen hat.
>
> Den Satz verstehe ich nicht.
Ja, das wundert mich nicht. ;) Da sollte "Thread" und nicht "Prozess"
stehen. Irgendwas ist auf dem Weg vom Gehirn zur Hand schief gelaufen.
http://linux.die.net/man/2/fork
The child process is created with a single thread—the one that called
fork(). The entire virtual address space of the parent is replicated in
the child, including the states of mutexes, condition variables, and
other pthreads objects; the use of pthread_atfork(3) may be helpful
for dealing with problems that this can cause.
Jetzt sollte dir auch klar sein, wie es zu dead locks kommen kann.
Christian
Mehr Informationen über die Mailingliste python-de