Re: some questions about times

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

 



Hi...

On Thu, Dec 9, 2010 at 21:56, loody <miloody@xxxxxxxxx> wrote:
> Deal all:
> I have some questions about times in #include <sys/times.h>.
> As far as I know, times will "get process and waited-for child process
> times".
> so if the child is not finish or dead, this function will cause the
> deadlock, right?

>From "man 2 times"
" In Linux kernel versions before 2.6.9, if the disposition of SIGCHLD is
       set  to SIG_IGN then the times of terminated children are automatically
       included in the tms_cstime and tms_cutime fields, although POSIX.1-2001
       says that this should only happen if the calling process wait()s on its
       children.  This non-conformance is rectified in Linux 2.6.9 and  later"

So, indirectly, I think the time accumulation happens when the wait()
function returns...which is...I guess polling or regularly checking
(select() maybe?) the signal from child.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux