Re: question about fork_main()

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

 



On Tue, Apr 21 2009, Francis Moreau wrote:
> On Mon, Apr 20, 2009 at 3:16 AM, Carl Henrik Lunde <chlunde@xxxxxxxxxxx> 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.
> >
> 
> Should I send a patch ?

Sure, provided you do testing of it as well ;-)

-- 
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