On 2018-10-23 16:48:12 [-0500], Jeff Epler wrote: > Hi, I have experienced similar symptoms in realtime programs (LinuxCNC). > We have a control thread which sometimes does operations like system(), > and one or more realtime threads. > > There, we changed from using system() to using posix_spawn and it > appears to have resolved the problem. > > However, I don't have any explanation as to why this is the case. On > the specific version of glibc I have, posix_spawn uses vfork and system > uses clone; other syscalls like rt_sigaction are taken in the system > case but not the posix_spawn case. The fork() makes the whole memory COW (every write access will cause a page fault, see mlock(2) man page). > Jeff Sebastian