Claudio Scordino wrote: > On Friday 11 November 2005 00:47, Hua Zhong (hzhong) wrote: > >>The reason is what if tsk is no longer available when you call >>getrusage? > > > Sorry, but honestly I don't see any problem: as you can see from my patch, if > tsk is no longer available, getrusage returns -1 and sets errno appropriately > (equal to EINVAL, which means that who is invalid). > > Claudio > You need to wrap this with a read_lock(&tasklist_lock) to be safe, I think. Regards, Magnus -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/