You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to POSIX, memory allocation using malloc (and thus new inherently as well) is not a safe operation after a fork call, because libc may have been allocating memory in another thread and so could have some mutexes locked, which would deadlock the child.
According to POSIX, memory allocation using
malloc(and thusnewinherently as well) is not a safe operation after aforkcall, because libc may have been allocating memory in another thread and so could have some mutexes locked, which would deadlock the child.See this article for a nice explanation:
http://www.linuxprogrammingblog.com/threads-and-fork-think-twice-before-using-them
Unfortunately
Poco::Process::launch()implementation does allocate memory at least in two places I've seen so far:https://github.com/pocoproject/poco/blob/develop/Foundation/src/Process_UNIX.cpp#L184
https://github.com/pocoproject/poco/blob/develop/Foundation/src/Environment_UNIX.cpp#L63-L65
(called from https://github.com/pocoproject/poco/blob/develop/Foundation/src/Process_UNIX.cpp#L167 )