tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

using of fork() in multithreaded application



Hello,
On my NetBSD 10.1 I am trying to run multithreaded application where first are created several threads and then is called fork() from main thread.
Forked child then calls execvp() .
Passed command line (in argv argument) is "gcc", "-dumpversion".

Application freezes because it waits for finishing child and ps -auxd shows child process "(gcc)"
with flag zombie.

I have two questions:
Is safe using of fork() in NetBSD 10.1 in mutlithreaded application ?
Does NetBSD 10.1 support "set follow-fork-mode child" when used /usr/bin/gdb ? I can step through source code of forked child only on-two lines not more.

Peter



Home | Main Index | Thread Index | Old Index