Re: question about fork_main()

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

 



On Mon, Apr 20 2009, Carl Henrik Lunde wrote:
> On Thu, Apr 9, 2009 at 20:49, Francis Moreau <francis.moro@xxxxxxxxx> wrote:
> > hello,
> >
> > I just took a look to fio source code (great tool BTW), and I'm
> > wondering about the fork_main() comment:
> >
> > /*
> >  * We cannot pass the td data into a forked process, so attach the td
> >  * and pass it to the thread worker.
> >  */
> >
> > Since after a fork(2) the child inherits the attached shared memory
> > segments from its parent, I don't see the point of this comment.
> >
> > Could anybody enlight me ?
> 
> I think your observation is correct, this is not necessary, shmat in
> the child can be avoided.

Yes, I'm not quite sure why it does that anymore, it's been that way
since 2004/5 when fio got moved to its own repo...

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux