Re: OT: fork(): parent or child should run first?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 11 Jan 2006, Kurt Wall wrote:
> On Wed, Jan 11, 2006 at 02:02:55PM +0100, Gábor Lénárt took 0 lines to write:
> > 
> > Ok, you're absolutly right here. My problem is to find some solution and not
> > to change the behaviour of fork() of course :) It's quite annoying to
> > introduce some kind of IPC between parent and childs just for transferring a
> > single pid_t ;-) Using exit status would be great (I would transfer "n")
> 
> But IPC, especially shared memory, would be great for this if you can
> set up the shmid ahead of time. It would certainly be fast.

I've not been following the thread, but if your suggestion is good, then
better would be to use mmap MAP_SHARED|MAP_ANONYMOUS - that gives memory
shared between parent and children, without all the nuisance of shmids.

Hugh

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux