[omniORB] system() under omniORB4
Mike Mascari
mascarm@mascari.com
Wed Oct 9 22:19:00 2002
Duncan Grisby wrote:
> On Wednesday 9 October, Mike Mascari wrote:
>
>
>>I have a server which, under omniORB3, invoked system() to
>>execute a shell command. Under omniORB4, however, the server
>>dies instantly..at least the thread invoking system() does. Is
>>system() prohibited under omniORB4 and if so, how can I achieve
>>the same results?
>
>
> Make sure you explicitly link with libpthread. That might fix it.
>
> Either way, the safest way to fork from a multi-threaded program is to
> pre-fork a process listening on a pipe before the main program starts
> any threads. Only do the system() call from the child process, which
> remains single threaded.
Thanks. I'll give that a shot...
Mike Mascari
mascarm@mascari.com