In message <[EMAIL PROTECTED]>, David Greenman writes:

>   I agree that we need to get rid of 'e' and any other options that allow
>reading another process's environment. I don't agree with putting the command
>args in the proc struct, however, for the reason that Sean mentioned above.
>In my opinion, doing so majorly bloats the proc struct for no good reason and
>also introduces gratuitous incompatibilities for utilities that want to modify
>their argv[*] and expect the modifications to show up in ps(1).

Let me clarify some details about my patch:

The args are not in struct proc, they hung in a separate data structure
off struct proc, so the size increase of struct proc is one pointer.

It can be disabled completely (apart from the pointer) with the
provided sysctl.

The data structure is shared across fork, until exec.

Caching the argument list saves us a vnode and a procfs inode
per running process (/proc/*/mem).

So far I have not been able to see a net increase in memory usage.

Please look at kvm_getargv(), procfs_mem.c and consider carefully
the case where two processes on a SMP system, both "ps -ax", are
at the same time examining one of these two processes memory to
get the argv.

--
Poul-Henning Kamp             FreeBSD coreteam member
[EMAIL PROTECTED]               "Real hackers run -current on their laptop."
FreeBSD -- It will take a long time before progress goes too far!


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to