Re: [9fans] Backgrounding a task

2017-10-24 Thread Giacomo Tesio
Here it is: https://github.com/JehanneOS/jehanne/blob/master/sys/src/cmd/ns/clone.c I'll leave the modifications to the plumber for another boring night... Giacomo 2017-10-25 1:00 GMT+02:00 Chris McGee : > >> Think about multiple processes owned by multiple users running on a >> cpu server. W

Re: [9fans] Backgrounding a task

2017-10-24 Thread Chris McGee
> 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. Ah, right. What about onl

Re: [9fans] Backgrounding a task

2017-10-24 Thread Giacomo Tesio
Here it is: https://github.com/JehanneOS/jehanne/commit/320e6e6f35bfbc2e37dbd079c8d6a9124bd9ac6c The simple test attached confirms that it works as expected: https://github.com/JehanneOS/jehanne/blob/master/qa/kern/nsclone.c Now it's just matter of modifying the plumber to use this facility and

Re: [9fans] Backgrounding a task

2017-10-24 Thread Giacomo Tesio
2017-10-24 16:21 GMT+02:00 Alex Musolino : > 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

Re: [9fans] Backgrounding a task

2017-10-24 Thread Alex Musolino
> 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 th

Re: [9fans] Backgrounding a task

2017-10-24 Thread Chris McGee
The namespace join facility looks interesting. Do you have a patch somewhere for it? > 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

Re: [9fans] Backgrounding a task

2017-10-23 Thread Alex Musolino
> So far, it looks like the closest equivalent is to draw a new window > and inherit the namespace of the original one by reading the namespace > from the proc. The problem with /proc/$pid/ns is entries that can't be "replayed". For example, the following command will not work: mount -b '

Re: [9fans] Backgrounding a task

2017-10-23 Thread Chris McGee
Thanks, I was thinking more about the case where I didn't know ahead of time that the command would take a long time. I have a sequence of steps I do in Unix to background the task using job control in the shell. I wasn't sure if there is some kind of plan 9 equivalent to the workflow, even if

Re: [9fans] Backgrounding a task

2017-10-23 Thread Yaroslav Kolomiiets
“window -m cmd” will run the command in the same namespace, forked, but in new window. “-m” is for “mount”, an alternative way of communication with the window system to /dev/wctl which is default. Yaroslav Kolomiiets 7 жовт. 2017 р. о 15:21 Chris McGee пише: Thanks for the tip! I'll give th

Re: [9fans] Backgrounding a task

2017-10-07 Thread Chris McGee
Thanks for the tip! I'll give that a try. Chris > On Oct 7, 2017, at 12:04 AM, Skip Tavakkolian > wrote: > > Spitballing here: in the new window do something like > > cat /proc/123/ns | rc > > Or first massage the ns then generate an output for rc. > >> On Fri, Oct 6, 2017, 4:34 PM Chris M

Re: [9fans] Backgrounding a task

2017-10-06 Thread Skip Tavakkolian
Spitballing here: in the new window do something like cat /proc/123/ns | rc Or first massage the ns then generate an output for rc. On Fri, Oct 6, 2017, 4:34 PM Chris McGee wrote: > Hi All, > > When I'm using Unix, there's a workflow that I use for long running > commands that I'm hoping to fi

Re: [9fans] Backgrounding a task

2017-10-06 Thread Erik Quanstrom
open a new window.  😀