--- src/corelib/io/qprocess_unix.cpp.orig 2011-11-17 17:04:43.000000000 +0100 +++ src/corelib/io/qprocess_unix.cpp 2011-11-17 17:06:42.000000000 +0100 @@ -47,6 +47,7 @@ #if defined QPROCESS_DEBUG #include "qstring.h" #include +#include /* Returns a human readable representation of the first \a len @@ -507,6 +508,16 @@ inline pid_t qt_fork() { #if defined(Q_OS_QNX) return vfork(); +#elif defined(Q_OS_FREEBSD) + int ret; + flockfile(stdin); + flockfile(stdout); + flockfile(stderr); + ret = fork(); + funlockfile(stdin); + funlockfile(stdout); + funlockfile(stderr); + return (ret); #else return fork(); #endif