bug-hurd
[Top][All Lists]
Advanced

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

Re: Hacking gnumach to track parental relationship of tasks


From: Justus Winter
Subject: Re: Hacking gnumach to track parental relationship of tasks
Date: Fri, 06 Sep 2013 10:56:28 +0200
User-agent: alot/0.3.4

Quoting Ludovic =?utf-8?Q?Court=C3=A8s?= (2013-09-05 18:11:43)
> Justus Winter <address@hidden> skribis:
> 
> > I made two rather small and (as I thought) straight forward changes to
> > gnumach to keep track of a tasks father task and to make this
> > information available.
> 
> Isn’t that what ‘proc_getpids’ is for?

No. proc_getpids as the name suggests is an RPC to the proc
server. Yes, you can query the parental relationship of tasks as it is
known to the proc server with it. The problem now is, that since Mach
lacks the concept of 'parent task', this is (respectively 'parent
process') solely implemented in Hurd and one has to mark newly created
processes as ones child using proc_child.

And here lies the problem, this is a mere convention. Until a process
is reparented using proc_child its parent is pid 1. Currently it is
possible to start tasks (and thus 'processes') without marking them as
ones child. This is a problem for a robust cgroups implementation.

> It feels wrong to retrofit POSIX concepts in Mach.

I do not consider tracking the creator of a task a POSIX concept, even
if POSIX does something very similar.

Justus



reply via email to

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