bug-hurd
[Top][All Lists]
Advanced

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

Re: Problem with time package, struct rusage and wait3


From: Roland McGrath
Subject: Re: Problem with time package, struct rusage and wait3
Date: Fri, 3 Aug 2001 22:58:37 -0400 (EDT)

> I was under the impression that, under normal UNIX semantics, if
> a process fork()'s a child process, then when the child terminates
> it will either receive a signal (SIGCHLD) or it's its call to
> waitX() will return. In Hurd both of these events are coordinated
> through proc. Are you saying that, it is possible for a task to
> terminate without one of the above two events occuring, thus
> not notifying proc?

Your mode of questioning doesn't really make sense to me.  So I will just
give you the answer I think you need.  These parts of POSIX process
semantics (wait, SIGCHLD) are implemented by the proc server.  Take a look
at how that works; proc is not very complicated to read.  The proc server
finds out that a Mach task died by receiving a dead-name notification for
its send right to the task's control port.  This is the only means the
microkernel provides to alert anyone that a task has died: the receive
right inside the kernel for the task port gets destroyed by task_terminate,
and all the same processing happens as for any destroyed port.  This
includes delivering dead-name notifications to anyone who has requested
them, and proc does this (see hurd/proc/mgt.c).

> Also, if we are talking about modifying the microkernel, is it worth
> considering modifying `struct task_basic_info' or adding another kind
> of task_info struct to get more statistal data from the kernel?

If there is something in particular you would like to collect, that would
be fine.  Nothing of this nature has been under discussion so far, so
you'll have to tell me what you are thinking of in specific.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]