9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Alex Musolino <alex@musolino.id.au>
To: 9fans@9fans.net
Subject: Re: [9fans] Backgrounding a task
Date: Wed, 25 Oct 2017 01:21:05 +1100	[thread overview]
Message-ID: <98A462DFDA6CBC03654DC58C6B063013@musolino.id.au> (raw)
In-Reply-To: 599371FE-4267-42E9-9493-BD0AB8659F98@gmail.com

> The namespace join facility looks interesting. Do you have a patch
> somewhere for it?

I'll see what I can dig up though it wouldn't tbe erribly difficult to
reimplement.  You basically just need to modify the pgrp pointer of
the proc, adjusting ref counts as required.

>> Of course, a lot of the isolation that per-process namespaces give
>> you is suddenly undone by the introduction of this facility.
>
> I'm not sure if the lack of isolation is any different than what can
> be done with a child process that shares the namespace.  Is there a
> particular case that you are thinking?

Creating a child process is something that a process explicitly
controls and the RFNOTEG flag of rfork(2) allows a process to control
whether or not it shares its namespace with its children.  Allowing
other, unrelated processes to fiddle with your namespace is quite
different.

Think about multiple processes owned by multiple users running on a
cpu server.  Which processes should be allowed to join which
namespaces?

Perhaps allowing only the hostowner to join namespaces for debugging
and administration purposes would be acceptable.

>> At this point I'm not entirely convinced that it's worth the
>> trouble.
> 
> I think that it can be depending on how much time you have spent
> building up a namespace for a process.  Perhaps I have spent hours
> working on something slowly customizing the namespace mounting and
> binding things.  If I end up running a long running command that
> blocks and I want to work in parallel with it then I must remember
> everything that I have done and repeat in a new window.  It seems
> like something the computer should do for me or at least help me to do
> it.

This seems a contrived example.  Would you really spend HOURS working
on setting up a namespace by hand?  Surely you would instead be
working on a script that builds the namespace for you; make the
computer do the work.  Then when you mess up, you can modify the
script, create a new window, and try again.

One more thing to consider is the #σ device in 9front which seems to
address some of the problems that you might otherwise use nsjoin to
solve.

--
Cheers,
Alex Musolino




             reply	other threads:[~2017-10-24 14:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 14:21 Alex Musolino [this message]
2017-10-24 19:18 ` Giacomo Tesio
2017-10-24 22:07   ` Giacomo Tesio
2017-10-24 23:00 ` Chris McGee
2017-10-24 23:13   ` Giacomo Tesio
  -- strict thread matches above, loose matches on Subject: below --
2017-10-24  3:54 Alex Musolino
2017-10-24 11:19 ` Chris McGee
2017-10-06 23:33 Chris McGee
2017-10-07  1:42 ` Erik Quanstrom
2017-10-07  4:04 ` Skip Tavakkolian
2017-10-07 12:21   ` Chris McGee
2017-10-23 17:20     ` Yaroslav Kolomiiets
2017-10-24  1:48       ` Chris McGee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98A462DFDA6CBC03654DC58C6B063013@musolino.id.au \
    --to=alex@musolino.id.au \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).