Re: linux-kernel-digest V1 #2839 (writable /proc/<pid>/cmdli

Brian Gerst (peeter_joot@VNET.IBM.COM)
Tue, 17 Nov 1998 09:35:10 -0500 (EST)


> > But, your point about threads is a good one, because argv[0] would be shared
> > for all threads and a writable /proc/<pid>/cmdline could be used to rename the
> > ps output for different threads/clones, and overwriting argv[0] wouldn't work
> > in this case.
>
> It wouldn't even with your /proc hack.
>
> If the threads share VM (with CLONE_VM) they share
> all memory, including the environment. argv[] is stored in the environment.
> Changing Linux to support only partly shared memory in CLONE_VM (with threads
> private pages like in Windows or OS/2) would be a fairly major redesign
> of the kernel threads mechanism.

Hi Andi,

I didn't think of that. I don't think that this is really a feature that
anybody really needs. At a glance it seems like a nice idea, but I don't
think that it is worth the effort.

Peeter

--
Peeter Joot                                          peeterj@ca.ibm.com
IBM DB2 Operating System Services                    416-448-3359 (tie line 778)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/