UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2011-06-20 05:50 PM

Peter
Guest

Daemon with childs and threads

Hi,
   Can you give me example how to create daemon with 2 children and 10 threads assigned to each child. I need example like Apache. The problem is that the daemon children must exchange data. I know that forked process's child have it's own address space. How I can solve this problem?

Regards
Peter

#2 2011-06-20 06:39 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,826
Website

Re: Daemon with childs and threads

I need example like Apache.

Well, it's open source, so there's nothing stopping you from using Apache as the actual example...

The problem is that the daemon children must exchange data. I know that forked process's child have it's own address space. How I can solve this problem?

There are various methods of IPC available...  What is most appropriate depends entirely on your specific needs...  Maybe shared memory is most appropriate, or maybe a Unix domain socket between the processes is more appropriate...  What data exactly are you exchanging?

Offline

Board footer

Powered by FluxBB