On Sat, Dec 6, 2008 at 12:24 AM, Roman Shaposhnik <[EMAIL PROTECTED]> wrote:
>> There are many things that would be *possible* with /proc, some of
>> them ill advised.  For instance, why can't I 'mkdir /proc/n/' and have
>> it create a new process?
>
> There's an aswer to that given by Ken in the Plan 9 paper:
>      http://www.cs.bell-labs.com/sys/doc/9.html:
> -----------------------------------------------------------------------------------------------------
> Nonetheless, it is possible to push the idea of file-based computing too
> far.
> Converting every resource in the system into a file system is a kind of
> metaphor,
> and metaphors can be abused. A good example of restraint is/proc, which is
> only a view of a process, not a representation. To run processes, the usual
> fork and exec calls are still necessary, rather than doing something like
>     cp /bin/date /proc/clone/mem
> ------------------------------------------------------------------------------------------------------

My mention of that was a contrived example.  But anyway....

This explains an artifact of the implementation, not the rationale
behind it, other than that it was considered to be metaphor abuse,
which everyone kind of "knows" but no one's really said *why* it's a
bad thing.  My argument, if you chose to pick through my convoluted
wording, was that it drastically changed the process model, but it's
unknown whether that's truly a bad thing (though most reasonable
people would agree that it is).

> P.S. I suppose one might argue that it is also an answer to *my* original
> question -- /proc/<id>/ns is just a representation.

Well, that's one answer but not a very satisfying one.  I think my
point was somewhat along Russ's lines; that no one's felt the need to
explore it.

        - Dan C.

Reply via email to